MDSLKTR / pouch-vue

Pouchdb bindings for Vue.js
MIT License
90 stars 17 forks source link

Aggregate option missing!? (pagination metadata) #47

Open appinteractive opened 4 years ago

appinteractive commented 4 years ago

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.

MDSLKTR commented 4 years ago

Hey, thanks for reporting this. We'll take a look shortly đź‘Ť

MDSLKTR commented 4 years ago

@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.

appinteractive commented 4 years ago

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?