mysql-bricks extends sql-bricks to generate MySQL-specific SQL statements, such as INSERT ... ON DUPLICATE KEY UPDATE, INSERT IGNORE, LIMIT/OFFSET, and ORDER BY in UPDATE/DELETE. Version 2.0.0 requires Node.js 6+ and ESM. It is a thin wrapper around sql-bricks and has no additional runtime dependencies beyond sql-bricks. Compared to alternatives like knex or squel, mysql-bricks is minimal and focused solely on MySQL dialect support.
npm install mysql-bricksNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates MySQL-specific features: INSERT ... ON DUPLICATE KEY UPDATE with multiple rows, and SELECT with LIMIT/OFFSET.
Use import syntax (ESM) or upgrade to Node.js 12+ with --experimental-modules or use bundler.
Manually quote identifiers or use column-value pairs with strings as values.
If missing features, open an issue or contribute PR, or switch to knex.
Run 'npm install mysql-bricks' and use 'import sql from "mysql-bricks"'.
Use default import: 'import sql from "mysql-bricks"'.
The 'sql' object from mysql-bricks includes all sql-bricks functions; no separate import needed.