Introducing: PouchDB-Paginators, for paging through data

84 views
Skip to first unread message

Diana Thayer

unread,
Apr 29, 2022, 11:34:55 PM4/29/22
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