How to get the total number of documents with minimongo from a RemoteDb collection without downloading all documents?

92 Views Asked by At

When using minimongo with a RemoteDb collection, I do not want to fetch thousands of rows documents then paginate them on the client, but I'd rather fetch them partially, as the user needs, and cache them on a local collection (e.g. MemoryDb, using an HybridDb). However doing so does not provide the total number of rows documents on the remote database, only the partially fetch (and cached) data.

How do people handle collections containing potentially hundreds of thousands of rows documents with Minimongo? Is that paradigm ignoring the number of document and just provides to the user a way to paginate "next" without knowing how many pages there are?

In other words, if the user searches items, and the app creates a selector for that search, how can the user know how many results there are without downloading potentially hundreds of thousands of rows documents through the RemoteDb collection?

0

There are 0 best solutions below