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
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- Relation Question
How do I create a relation from table y to an others x.$id. in my example I have a users table where I use Appwrites unique User IDs and I want other tables fo...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...