Pagination plugin for the ORM2 Node.js library. Current stable version is 0.0.1, with no active development since initial release. Provides `.pages()` and `.page()` chainable methods to compute total pages and retrieve specific pages directly from a model. Configured via `Model.settings.set('pagination.perpage', n)`. Depends on ORM (orm) package. Minimal API surface; no pagination metadata returned, only raw records.
npm install orm-pagingNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL, defines a model, sets pagination to 10 per page, gets total pages and retrieves page 3.
Always pass a callback that handles error: .pages((err, pages) => { if (err) throw err; })Use .pages() first to get total count, then calculate metadata manually.
Use .pages(cb) for total pages; .page(n).run(cb) for data.
Consider alternative pagination methods directly in ORM or use a fork.
Use Model.settings.set('pagination.perpage', n);Ensure you call db.use(paging) after connect and before using Model.
Run: npm install orm
Call .run(callback) at the end of the chain: Model.page(1).run(cb, options?)