MySQL plugin for Egg.js framework (v2.1.0), providing MySQL database access with CRUD operations, transaction support, and multi-datasource capabilities. Currently stable with no major release cadence. Differentiators include built-in pagination, selectKey style (camelcase/underline), and Literal expressions. Compared to egg-mysql, it offers a more streamlined API with page/order helpers.
npm install egg-cute-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows minimal plugin configuration and a controller query.
Set selectKey to 'Underline' if your database uses snake_case.
Always use parameterized queries: app.mysql.page('select * from posts where title=:title', { title: 'Hello' })Use async/await: await app.mysql.beginTransactionScope(async (conn) => { ... }, ctx);Set agent: true if you need access on agent process.
Use Egg 2.x or check plugin compatibility with Egg 3.x.
Run: npm install egg-cute-mysql --save
Check config/plugin.js has enable:true and package name correct. Ensure config.mysql.app = true in config/config.default.js
Verify host, port, user, password, and database in config. Ensure MySQL server is running.
Use config.mysql.clients object with clientId keys, and call app.mysql.get('clientId').query()No dependency data recorded yet.