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
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...
- Index for combination of columns
How am i suppposed to apply index so that combination of two columns alwasy remain unique in appwrite table though console
- Broken Flutter SDK >=24.1.0
Row.fromMap now does: ``` data: Map<String, dynamic>.from(map["data"] ?? {}) ``` But Appwrite Cloud TablesDB row responses return custom row columns flattene...