@sqb/mysql-dialect
v6.0.12
Published
SQB serialization extension for MySQL database
Readme
About SQB
SQB is an extensible, multi-dialect SQL query builder and Database connection wrapper for NodeJS.
About @sqb/mysql-dialect
This package registers the mysql SQL serialization dialect (a SerializerExtension for
@sqb/builder) used by @sqb/mysql. It is loaded automatically when
@sqb/mysql is imported, so you normally don't need to depend on it directly — install it only
if you want to .generate({ dialect: 'mysql' }) MySQL SQL text without pulling in the mysql2
driver.
Besides MySQL's reserved-word list and identifier escaping, it accounts for a handful of syntax
differences from ANSI SQL / other dialects that @sqb/builder's default serializer doesn't know
about: LIMIT/OFFSET instead of the SQL-standard clause (with the LIMIT 18446744073709551615
trick MySQL requires for an offset-only query), 1/0 instead of true/false for boolean
literals, IS [NOT] NULL instead of = NULL/!= NULL, and stripping RETURNING entirely since
MySQL has no equivalent clause (@sqb/mysql emulates it with a follow-up SELECT instead).
Installation
$ npm install @sqb/mysql-dialect --saveNode Compatibility
- node >= 20.x
License
SQB is available under MIT license.
