简体   繁体   中英

PouchDB data view by-sequence

Is it possible to show PouchDB data order by "by-sequence" (sequence when they insert into PouchDB). I don't want it to order by _id. Please help!

That's easy: use the _changes feed . Just make sure to use the include_docs option to get the complete docs. You can even get new changes continuously to react on live changes.

If you need to sort your views by seq, I think there is an obscure option in CouchDB that enables access to the seq for each document, but it's probably unsupported by PouchDB. Please follow up if you need more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM