MySQL paginator plugin for Egg.js framework (v1.0.1, last updated 2020). Adds a mysqlPaginator instance to the Egg application context, providing paginated MySQL queries with automatic total count, ordering, and pagination metadata. Key differentiator: seamless integration with egg-mysql, minimal configuration, supports both object-based where clauses and raw SQL strings. Ideal for Egg.js projects needing simple pagination without additional ORM or query builder complexity.
npm install egg-mysql-paginatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures the plugin and performs a paginated query with object where clause and ordering.
Ensure config/plugin.js includes both 'mysql' and 'mysqlPaginator' entries.
Consider migrating to newer pagination solutions or using raw queries with egg-mysql.
Consistently use either object format or raw SQL strings, never both.
Run 'npm install egg-mysql-paginator --save' and ensure config/plugin.js contains 'exports.mysqlPaginator = { enable: true, package: 'egg-mysql-paginator' };'Enable both 'mysql' and 'mysqlPaginator' plugins in config/plugin.js.
Check that 'config.mysql' is correctly configured with database credentials and both plugins are enabled.