I've been using Google Cloud for a client's project. I've used App Engine + Firestore, and I had to implement pagination for a big table of logs.
I have to say, it's been really challenging and I'm still not happy with it. In my use case I need to:
- Paginate without any filter
- Paginate the results of a query
In the first case, I just need to have a counter store somewhere that is increased every time a new log is added to the collection. Weird but easy enough. In the second case, I need to have the number of items in the query's result, and I had to create another "aggregation" field that saves a counter for each of the values that the field can have. And I'd have to do this for each field!
I'm wondering if I'm missing something here, or if Firestore is just not good for my use case.
How did you approach pagination with Firestore?