I wanted to implement pagination in my application. As I understand it, for scrolling pagination I should use "Cursor pagination", which is a nicer solution in most cases. However, in my application, I need the ability for the user to "jump" a few pages further. So if I understand correctly I should use:" Offset pagination". However, I have a problem understanding how to display the number of available pages before. Is there any way to get the amount of all the documents in the collection without downloading them first?
Is there any way to get the amount of all the documents in the collection without downloading them first?
I would suggest maintaining this count yourself in a metadata collection.
Otherwise, for now, you can use list documents, pass a really high limit, and select a single small attribute. Then, check the length of documents. The problem with this is it will get slower as the count gets higher
Recommended threads
- Whats wrong here
I keep trying to fucking add the appwrite domains including CNAME and CAA but it keeps failing , this is the exact records i have right now in cf
- Returned columns when Query.select is us...
Hello, I am noticing that whatever i put in Query.select, the returned data will always contain the following fields ` "total": 1, "rows": [ { ...
- Does appwrite supports increasing the va...
I am building a chat application where user message needs to increased on every row creation. For this is there any increament feature?