A lightweight, chainable MySQL query builder for Node.js, version 0.1.2. Designed as an alternative to complex ORM query builders, it uses method chaining to construct SQL statements. Currently only supports MySQL, with a simple API including select, where, whereIn, whereBetween, joins, and order by. Not actively maintained; limited functionality compared to Knex or Sequelize.
npm install chain-mysql-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows chainable where with OR grouping and outputting SQL string for use with mysql package.
Manually escape inputs using mysql.escape() or use parameterized queries with the driver.
Use 'wherein' instead of 'whereIn'.
Use three arguments to specify operator: where('col', '>', 5).Use 'get()' with array argument or 'select()' alone.
Consider migrating to Knex or Sequelize for active development and TypeScript support.
const Builder = require('chain-mysql-builder'); const query = new Builder('table');Use .wherein('col', [1,2,3]) instead of .whereIn(...).Ensure chain ends with .toSql(): new Builder('t').all().toSql();No dependency data recorded yet.