query-mysql is a lightweight Node.js library for managing MySQL queries, version 0.0.2. It provides a simple promise-based interface for common database operations such as select, insert, update, and delete. The library wraps the mysql npm package and offers a chainable query builder to simplify SQL generation. However, it is in very early development (pre-1.0) with minimal documentation, no test coverage, and appears to be unmaintained, last updated in 2020. Alternatives like knex.js or mysql2 provide more robust features, better performance, and active community support.
npm install query-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a connection to MySQL, performs a simple select query using the chainable builder, and closes the connection.
Consider migrating to knex.js or mysql2 for active support.
Use a connection pool from the mysql package directly if needed.
Always use parameterized queries via the where object syntax.
Check the query type to determine expected result shape.
Run 'npm install query-mysql' and ensure package.json includes dependency.
Use 'new QueryMysql({...})' and call methods on the instance, not the class.