@sqb/mariadb-dialect
v6.0.12
Published
SQB serialization extension for MariaDB database
Readme
About SQB
SQB is an extensible, multi-dialect SQL query builder and Database connection wrapper for NodeJS.
About @sqb/mariadb-dialect
This package registers the mariadb SQL serialization dialect (a SerializerExtension for
@sqb/builder) used by @sqb/mariadb. It is loaded automatically
when @sqb/mariadb is imported, so you normally don't need to depend on it directly.
It's a close relative of @sqb/mysql-dialect — same LIMIT/OFFSET syntax,
1/0 booleans, and IS [NOT] NULL rewriting — extended with MariaDB's own reserved words on
top of MySQL's, and RETURNING handling that reflects what MariaDB actually supports (see below).
Unlike @sqb/mysql-dialect, this dialect does not strip the RETURNING
clause from INSERT and DELETE statements: MariaDB (10.5+) supports RETURNING natively for
those, so @sqb/mariadb can read back affected rows directly from the statement response instead
of emulating it with a follow-up SELECT. MariaDB does not support RETURNING on UPDATE
(verified against 11.8), so it is stripped there and @sqb/mariadb falls back to a follow-up
SELECT, the same way @sqb/mysql does for every statement type.
Installation
$ npm install @sqb/mariadb-dialect --saveNode Compatibility
- node >= 20.x
License
SQB is available under MIT license.
