mariadb-connector-nodejs-usage
MariaDB-specific behavior of MariaDB Connector/Node.js (the mariadb npm package, a non-blocking driver) for application code — that the Promise API is default, with the Callback API under require('mariadb/callback'); that ? positional placeholders are default and :name style needs namedPlaceholders; that BIGINT and insertId return native BigInt unless bigIntAsNumber/insertIdAsNumber are set; that batch() uses the bulk protocol instead of looping query(); that queryStream() is needed for large results since query() buffers everything in memory; that pool.getConnection() needs a release() in a finally; that autocommit follows the server default (ON) so transactions need explicit beginTransaction()/commit()/rollback(); and that execute() uses server-side prepared statements while query() uses the text protocol. Use when writing or reviewing Node.js code that talks to MariaDB with the mariadb package.
Pinned to revision 2206a90dc255, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.