@sqb/mariadb
v6.0.12
Published
SQB adapter for the mariadb driver
Readme
About SQB
SQB is an extensible, multi-dialect SQL query builder and Database connection wrapper for NodeJS.
About @sqb/mariadb
This package is a SQB Adapter for MariaDB, backed by the official
mariadb driver. It uses the
driver's named placeholder support (:name), which matches the parameter syntax @sqb/builder
generates by default.
Unlike @sqb/mysql, INSERT ... RETURNING and DELETE ... RETURNING don't need a
follow-up SELECT: MariaDB (10.5+) supports RETURNING natively for those, so affected rows are
read directly from the statement response. MariaDB has no UPDATE ... RETURNING (verified against
11.8), so that one case still falls back to a follow-up SELECT, the same way @sqb/mysql handles
every statement type.
Installation
$ npm install @sqb/mariadb --saveUsage
import '@sqb/mariadb';
import { SqbClient } from '@sqb/connect';
const client = new SqbClient({
driver: 'mariadb',
host: 'localhost',
port: 3306,
user: 'root',
database: 'mydb',
});Node Compatibility
- node >= 20.x
License
SQB is available under MIT license.
