
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
- Microsoft Oauth2 gets auto disabled
I'm runnin appwrite self hosted 1.7.4 and once every few hours the provider keeps getting disabled for whatever reason. I don't see anything in the logs and wo...
- Blob column?
Hi, I'm looking to use yjs/hocuspocus, and appwrite as the backend store, but I'm not finding a way to create a blob column in the database. Is there a way arou...
- Error during migration from self-hosted ...
The self-hosted version is 1.4.13
