Mysql-wrap-production is a lightweight promise-based wrapper for the node-mysql driver, providing helper methods for SELECT, INSERT, UPDATE, DELETE, streaming, and pagination. Version 0.10.1, last updated in 2017, is in maintenance mode. It only accepts poolCluster connections and returns promises (no callbacks). Light dependency on node-mysql and q promises.
npm install mysql-wrap-productionNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MySQL pool, wraps it with mysql-wrap-production, and executes a simple SELECT query.
Replace mysql with mysql2 and use mysql2.createPool() instead of mysql.createPool().
Always sanitize user input or use parameterized queries via `sql.query('...', [values])`.Use mysql.createPoolCluster() and add nodes, or use an older version (0.9.x) if you need single pool support.
Use version 0.9.x which returns native promises, or switch to a more modern wrapper like 'mysql2/promise'.
Always attach an error handler to the stream: `stream.on('error', err => {})`.Run `npm install mysql-wrap-production` in your project directory.
Use `const createNodeMySQL = require('mysql-wrap-production');` (no destructuring).Ensure you use mysql.createPoolCluster() and call `createNodeMySQL(poolCluster, { replication: {...} })`.Remove callback arguments and use `.then()`/`.catch()` or `await`.