A lightweight Node.js MySQL query builder wrapper around the `mysql` package, designed to simplify common database operations like select, insert, update, delete, and joins. Version 1.1.5 is the latest stable release, with no active development observed. It provides a chainable API for building SQL queries (select, where, orderBy, groupBy, join, etc.) and supports promise-based async/await. Key differentiators include automatic SQL injection protection via parameterized queries, multiple where clause formats (string, object, array), and a `create` method for multiple database instances. However, it lacks TypeScript support, connection pooling documentation, and may have maintenance concerns.
npm install eq-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure eq-mysql with environment variables, then use the chainable builder to fetch active users.
Consider using a wrapper that supports 'mysql2' or manually replace the dependency.
Use eqMysql.create({...}) for separate instances instead of config().Implement a custom pool using the underlying 'mysql' package and pass the pool's connection via config().
Use array-of-arrays syntax for OR conditions: where([['id', '=', 1], ['id', '=', 2]])
Consider migrating to a more modern library like 'mysql2' with built-in promise support.
Run npm install mysql
Ensure you are requiring eq-mysql with const eqMysql = require('eq-mysql');Verify host, user, password, and database in the config.