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
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard
- what happened with 'never paused' ????
I can already imagine how annoying this is going to be...
- 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...