Back

[SOLVED] (Query method not valid: between)

  • 0
  • Databases
Mosh Ontong
27 Aug, 2023, 04:52
TypeScript
  Query.between('bookingStart', date.toIso8601String(),
          date.add(const Duration(days: 1)).toIso8601String()),
TL;DR
There was an issue with the query method 'between' that has been solved. The issue can be found at: https://github.com/appwrite/appwrite/issues/5650. If you encounter the error 'Query method not valid: between', try using the 'greaterThan' or 'lessThan' queries instead. The user in the thread had a calendar picker and was trying to fetch documents with the same date. 'between' was added in version 1.3.0, but it may not work with the cloud yet.
Binyamin
27 Aug, 2023, 04:54

Are you running against the cloud?

Binyamin
27 Aug, 2023, 04:55

between was added in version 1.3.0

Binyamin
27 Aug, 2023, 04:55

It won't work with the cloud just yet

Mosh Ontong
27 Aug, 2023, 04:56

ohh I see so how can I query date?

Mosh Ontong
27 Aug, 2023, 04:56
Mosh Ontong
27 Aug, 2023, 04:56

I have calendar picker when I want to pick date then I have to fetch all document that have the same date

Binyamin
27 Aug, 2023, 04:57

Use graterThan or lessThan queries

Mosh Ontong
27 Aug, 2023, 04:57
TypeScript
   Query.greaterThanEqual('bookingStart', date.toIso8601String()),
      Query.lessThanEqual(
          'bookingStart', date.add(const Duration(days: 1)).toIso8601String()),
Mosh Ontong
27 Aug, 2023, 04:57

not working

Binyamin
27 Aug, 2023, 04:58

I can recreate it tomorrow to check if it won't get solved be then

Mosh Ontong
27 Aug, 2023, 05:10

[SOLVED] (Query method not valid: between)

Guille
27 Aug, 2023, 16:30

Just for the record, there is an issue for this: https://github.com/appwrite/appwrite/issues/5650

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more