Groups
Groups
Sign in
Groups
Groups
couchdb-user-archive
Conversations
About
Send feedback
Help
Introducing: PouchDB-Paginators, for paging through data
84 views
Skip to first unread message
Diana Thayer
unread,
Apr 29, 2022, 11:34:55 PM
4/29/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to us...@couchdb.apache.org
Howdy folks,
Pagination in CouchDB and PouchDB is not entirely intuitive
<
https://pouchdb.com/2014/04/14/pagination-strategies-with-pouchdb.html
>.
Inspired by my continuous need for pagination methods and the rude den of
pitfalls and gotchas associated with doing it correctly, I put together
PouchDB-Paginators <
https://www.npmjs.com/package/pouchdb-paginators
> to
provide a reliable API around paging through data in map/reduce views and
Mango queries.
The plugin wraps db.query() and db.find() so that they return paginators
rather than promises with results. The paginator exposes methods for
traversing results backwards or forwards, and even in a `for await` loop.
You can read more about it on GitHub
<
https://github.com/garbados/pouchdb-paginators#pouchdb-paginators
>. Let me
know what you think!
Best regards,
Diana
Reply all
Reply to author
Forward
0 new messages