Put list documents in a loop until you don't have any documents left
So there isnt any way to surpass the 25 documents limit?
Btw, you don't need to await each delete
Before version 1.3, the maximum limit is 100. After that, you can set some high number, but it's still good to paginate/do it in chunks
Got it, for my frontend im using pagination
Also, how can i change that limit?
The limit query: https://appwrite.io/docs/databases-queries
Got it thanks a lot
[SOLVED] Code to clear database
It is specified in docs 🤔
Only on the queries docs for the limit query, right? But if I'm only looking at the list documents API, it's not there and I'd have to dig in a bit before finding out of the default limit.
Before, when we had limit as a param, it was much more apparent. Now, it's kind of hidden away
Yes, true
🤣 For DX, it's basically a choice.
For discoverability, force them to provide the limit ever single time does this. Otherwise we'd have to rely on them reading docs.
A possibility is to just add this information in the return object:
{
"total": 25,
"limit": 25,
"offset": whatever,
"other_stuff": wejrk,
"documents": [
{
"$id": "5e5ea5c16897e",
"$collectionId": "5e5ea5c15117e",
"$databaseId": "5e5ea5c15117e",
"$createdAt": "2020-10-15T06:38:00.000+00:00",
"$updatedAt": "2020-10-15T06:38:00.000+00:00",
"$permissions": [
"read(\"any\")"
]
}
]
}
But my honest opinion is that long term this is just a quirk they should have to learn 😅 I feel like every framework has a few. We can make it easier with better docs + hinting
The other extreme option is to basically have no limit by default
Docs is fine to me, but it's just a little hidden right now
And be like SQL
where the default behavior is as expected, literally no limit and it just crashes your terminal if you try to select * from BIG_DATA_LAKE
LOL
😅 I feel like we can probably show that we requested up to x objects and y objects were returned
That would offer a hint
The most confusing part is "total"
total of what?
The entire DB?
The entire collection?
Recommended threads
- Self hosted project based backup
Is there a native way to perform a project-level backup in a self-hosted instance, instead of backing up the entire Docker instance? If not, I would like to off...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- 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...