A promise-based SQL library for Node.js, primarily aimed at MySQL use cases. Current stable version 0.6.3 wraps the mysql npm package with Bluebird promises, providing a cleaner API for query building and execution. The library supports parameterized queries, nested result sets, and transaction helpers. Release cadence is irregular; last update was several years ago. Compared to alternatives like mysql2 or knex, this package is minimal and no longer actively maintained. It offers basic query building with promise chaining but lacks TypeScript definitions and modern ESM support.
npm install pimp-my-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a MySQL connection using pimp-my-sql, runs a simple SELECT query with async/await, logs the result, and closes the connection.
Migrate to mysql2 or knex for modern promise support and active maintenance.
Wrap Bluebird promises with Promise.resolve() if you need native promise methods.
Install mysql as a dependency; do not use mysql2 as it will cause runtime errors.
Use @types/mysql if needed, but expect limited support.
Use dynamic import() in CommonJS files or switch to ESM.
Run 'npm install pimp-my-sql' and ensure it is in dependencies.
Use ESM import syntax: 'import pimpMySql from 'pimp-my-sql''
Alter MySQL user to use mysql_native_password: 'ALTER USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';'
Implement connection retry logic or use connection pooling with the underlying mysql package.