final documents = await databases.listDocuments(
databaseId: AppwriteClientHelper.databaseId,
collectionId: AppwriteClientHelper.vocabularyCollectionId,
queries: [
Query.select([]),
Query.equal("language", languageSelected.languageId),
// Query.limit(10),
Query.orderDesc("\$updatedAt")
]);
I have a 39 total documents in my collection. Now, when I fetch all the documents why only it gives me 25 documents? as you can see in my code I already commented out the Query.limit,
The default limit is 25
Then how can I fetch all the list of my documents? without limiting?
is it okay to set the limit to 1000 Query.limit(1000)
because I am going to create a script to export all documetns
Max limit is 100
I really recommend cursor-based pagination with a limit of 100 or so...but, technically, we have removed the max limit, so you can pass a really big number for limit if you really wanted to
Appwrite now allows a larger limit in the query? I've been doing while loop with a flag called "isMore" and check the return docs (if it reaches 100) and then querying again with offset going up
How much can you query now?
as high as you want...but i recommend sticking with your previous implementation
Ok
Just to complement your answer take a look this article about pagination, the benchmarks are really interesting
https://itnext.io/the-best-database-pagination-technique-is-530abf2aab51
Recommended threads
- Request for temporary 3 to 4 hours datab...
Hi Appwrite Team, I hope you are doing well.We are an early-stage startup currently running on Appwrite Cloud. We have unfortunately exhausted our database rea...
- Realtime Error Invalid query: Syntax err...
I was test driving Self-Hosted Appwrite for my use with Swift IOS apps as a backend while back and after successful trials, I started to move to incorporate int...
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...