A lightweight wrapper around the node-mysql driver providing promise-based query methods (select, insert, update, delete) along with helper functions like selectOne and row count. Version 0.5.3 is the latest release; last updated in 2016. It wraps node-mysql and supports connection pooling and pool clusters with read/write separation. Key differentiators: simpler API, built-in promise support via Q library, and pagination helpers. Not actively maintained; alternatives include mysql2 or knex.
npm install mysql-wrapNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating a connection, wrapping it with mysql-wrap, and executing a simple SELECT query using promises.
Migrate to mysql2 which supports promises natively or use knex for a query builder.
Use Q.nfcall or convert with Promise.resolve(). Ensure Q is available.
Always pass a valid mysql connection, pool, or poolCluster.
Check if you need a single connection or pool and pass the correct object.
Run `npm install mysql-wrap` and ensure correct path.
Use `const createMySQLWrap = require('mysql-wrap');` instead of `import`.Implement connection retry logic or use mysql2 with promise wrapper.