pouch-vue icon indicating copy to clipboard operation
pouch-vue copied to clipboard

Aggregate option missing!? (pagination metadata)

Open appinteractive opened this issue 4 years ago • 3 comments

Hey I'm trying to get paggination metadata so I do not need to query again for the total number of results just do display usefull pagination information. I see that there is an aggregate option in pouchdb-live-find which is already used my this library but is not exposed at all to the enduser.

Am I missing anything here or is the aggregete data really missing? If so, my suggestion would be to ouput the result with aggragation data is the user is setting aggregate: true in the query.

appinteractive avatar Apr 11 '20 11:04 appinteractive

Hey, thanks for reporting this. We'll take a look shortly 👍

MDSLKTR avatar Apr 14 '20 07:04 MDSLKTR

@appinteractive Can you post your query object since aggregate is always set to true at the moment, the aggregation should be there but maybe i'm missing something here.

MDSLKTR avatar Apr 14 '20 11:04 MDSLKTR

Hey I just do a basic query with skip and limit and a select. What I would have expected was the total_rows but after looking into pouchdb-live-find I don’t thing I can get that. So currently I do run another query to get the total. Not the prettiest but it works.

Or do you see the a better way?

appinteractive avatar Apr 14 '20 19:04 appinteractive