A promisified wrapper around the popular mysql npm package, providing an async/await interface for MySQL queries, transactions, and connection pooling. Current stable version is 1.0.2, released in late 2020 with low maintenance cadence. Key differentiators: uses custom escape format with ':word' for values and '|word' for identifiers, stateless MySQL class with both pool and connection approaches, built-in transaction support via getTransactionDb(). Lightweight alternative to more heavyweight ORMs like Sequelize.
npm install mysql-promisifyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a MySQL instance and runs a query with named parameter binding using :param syntax.
Use ':paramName' for values and '|paramName' for identifiers in SQL strings
Obtain a new transaction handle via db.getTransactionDb() for each transaction
Consider migrating to mysql2/promise for official promise support
Avoid DDL statements inside transactions; refer to MySQL implicit commit documentation
npm install mysql-promisify --save
Ensure using 'const { MySQL } = require('mysql-promisify'); const db = new MySQL({...});'Set 'timeout' option in MySQL constructor or implement reconnection logic