A Promise-based MySQL query builder wrapper for Node.js using connection pooling from node-mysql. Version 0.0.10 provides a fluent API for SELECT, INSERT, UPDATE, DELETE with methods like table(), field(), limit(), page(), join(), union(), and where(). It simplifies raw SQL by chaining method calls and automatically escapes identifiers. Low release cadence (last update unknown). Differentiates from knex.js by being lighter and simpler, but lacks documentation on security and SQL injection; requires careful use. Not actively maintained.
npm install uh-node-mysql-promiseNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates connecting to MySQL, chaining query builder methods, and handling promise result/error.
Always use object notation for where() conditions; avoid string concatenation with user input.
Pin mysql dependency version in your package.json and test after updates.
Use require() instead of import, or use dynamic import() with .mjs extension.
Use array notation for fields to avoid parsing issues.
Pass all conditions as a single object to where() to combine them.
var mysql = Mysql.createConnection({...}); then mysql.table('table')Ensure .then() and .catch() handle exactly one response and use async/await correctly.
Use array notation: .field(['col1', 'col2'])