This category contains release notes for releases in the MariaDB Connector/Node.js 3.x series
Release date: 3 Jul 2025
MariaDB Connector/Node.js 3.4.4 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-322: TypeScript types/share.d.ts and types/callback.d.ts are not published
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
An issue was discovered in the Connector/Node.js 3.4.3 release shortly after release and it has been replaced by Connector/Node.js 3.4.4. See the 3.4.4 release notes for more details.
Release date: 2 Jul 2025
MariaDB Connector/Node.js 3.4.3 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-309: Enhanced TypeScript support by adding mariadb/callback type definitions
CONJS-319: Resolved SSL identity verification issue where servername parameter wasn't being properly validated
CONJS-320: Fixed cluster filtering problems in query/execute operations when using the callback API
CONJS-321: Moved @types/geojson and @types/node packages to development dependencies for cleaner production builds
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 25 Apr 2025
MariaDB Connector/Node.js 3.4.2 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-318: Repeated named placeholders causes "Placeholder is not defined"
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 2 Apr 2025
MariaDB Connector/Node.js 3.4.1 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-306: Support "zero configuration ssl" for parsec authentication
CONJS-315: Fixed issue with incorrect data for result-set rows of exactly 16M of data
CONJS-312: Improved pool error messages when failing to create connections
CONJS-313: Now allows using question mark parameters even when using namedPlaceholders option (mysql compatibility)
CONJS-305: Added Connection close alias for end function in TypeScript definition
CONJS-314: Fixed Bulk operations potentially returning unexpected error "Cannot read properties of undefined (reading '0')"
CONJS-275: Added capability to return all Bulk insert IDs for MariaDB server 11.5.1+
CONJS-304: Fixed bulk operations ending with "Got a packet bigger than 'max_allowed_packet' bytes" error
CONJS-316: Enhanced handling of non-bulk batched operations to avoid out-of-memory errors for batches not using bulk
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 24 Oct 2024
MariaDB Connector/Node.js 3.4.0 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-299 Support of the PARSEC Authentication Plugin which is provided starting with MariaDB Server 11.6. See the PARSEC Authentication Plugin documentation for more details
CONJS-295 A new option jsonStrings has been added which can be used to return a JSON field as type string instead of type JSON
When working with JSON fields in MariaDB and MySQL, it's important to note that the handling differs between the two database systems.
autoJsonMap Option: The autoJsonMap option provides flexibility in MariaDB. You can choose to have the connector return either JSON objects or string representations of the JSON data.
jsonStrings Option: The jsonStrings option introduces a similar choice for MySQL JSON fields. It allows you to specify whether the connector should return JSON objects or string values.
In essence, the JSON fields will be returned either as a JSON or String will depend on 2 different options depending on the database you’re working with.
CONJS-296 Add option enableKeepAlive / keepAliveInitialDelay alias for keepAliveDelay for mysql2 compatibility
The keepAliveDelay option in MariaDB connectors controls the frequency of keep-alive packets sent to maintain a persistent connection.
Disabled: When set to 0, keep-alive functionality is disabled.
Enabled: For any non-zero value, keep-alive packets are sent at the specified interval.
MySQL 2 Compatibility: To ensure compatibility with the MySQL 2 connector, the enableKeepAlive and keepAliveInitialDelay options have been added.
enableKeepAlive: If disabled, keepAliveDelay is automatically set to 0, effectively disabling keep-alive.
enableKeepAlive: If enabled, keepAliveDelay is set to the value specified in keepAliveInitialDelay.
In summary, the keepAliveDelay option determines the keep-alive frequency, while the enableKeepAlive and keepAliveInitialDelay options provide compatibility with MySQL 2 connectors by allowing you to control whether keep-alive is enabled and set the initial delay.
CONJS-303 DMLs are not returning an output while streaming
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 18 Sep 2024
MariaDB Connector/Node.js 3.3.2 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-301 delay TLS identity validation until certificate normal or fingerprint validation
CONJS-302 TypeScript type definition file for SqlError constructor does not match actual constructor
CONJS-297 Typescript connection option timeout in place of queryTimeout
CONJS-298 Typescript wrong named longlong in place of bigint
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 5 Jun 2024
MariaDB Connector/Node.js 3.3.1 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-288 A pool timeout error now returns connection timeout details
CONJS-292 Connector does not permit passing a String object (≠ native string) parameter
const objVal = new String('myValue');
CONJS-286 When using a prepared statement and explicitly disabling prepare cache using prepareCacheLength=0, the connector might not retrieve results anymore
CONJS-287 Typescript is missing 'QueryOption'
for the 'prepare'
command
CONJS-293 When using batch, javascript Date values that are not in the range 1970-01-01 00:00:01 - 2038-01-19 03:14:07
are saved as null
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 21 Mar 2024
MariaDB Connector/Node.js 3.3.0 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
In order to have SSL connections, there was 3 solutions:
Have server certificates generated with trusted node.js Certificate Authorities (CA), configuration was then like ssl: true
.
Configure connector with server certificate like:ssl: { ca: [ fs.readFileSync('server-cert.pem') ] }
disable certificate ssl verification (not secured!) like:ssl: { rejectUnauthorized: true }
Since MariaDB 11.4.1 (MDEV-31855), enabling SSL is super easy, with simple configuration like:ssl: true
, even if server has not configure ssl certificates. The connector doesn't need to know server certificate anymore, if password is not empty. This is part of mission impossible zero configuration, client validating ssl certificates using client password.
Previous use of connection.execute was executing PREPARE command first, read PREPARE response, then execute EXECUTE command and finally read EXECUTE response.
New implementation, when using MariaDB server 10.2+ and with pipelining
option enable (default value) will execute PREPARE, execute EXECUTE, then only read PREPARE response and read EXECUTE response. This permit to avoid much of the network latency.
Benchmarking results using local database: (distant database would have even better result)
This improvement is for first execution of a specific query, since PREPARE is cached by default, second execution would only execute EXECUTE command
CONJS-279 Improve query encoding and decoding performance
CONJS-281 cannot connect to 11.3+ server with character-set-collations = utf8mb4=uca1400_ai_ci
CONJS-277 using connection.importFile when connection is not connected to database result in error
CONJS-278 Possible buffer overwrite when sending query bigger than 16M
CONJS-282 error when using mysql_clear_test password authentication plugin
CONJS-283 wrong decoding of binary unsigned MEDIUMINT
CONJS-285 DECIMAL field wrong decoding with deprecated option 'supportBigNumbers' set
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 19 Dec 2023
MariaDB Connector/Node.js 3.2.3 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-207 Add support for connection redirection, an upcoming MariaDB Server and MaxScale feature
CONJS-271 Wrong binary decoding of 00:00:00 TIME values
CONJS-272 Error doesn't always have parameters according to option
CONJS-273 Bulk insert error when last bunch of parameters is reaching max_allowed_packet
CONJS-274 Disabling BULK insert for one batch is not possible
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 16 Oct 2023
MariaDB Connector/Node.js 3.2.2 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-270 Always send connection attributes, even when option connectAttributes
is not set
CONJS-269 avoid useless "set names utf8mb4" on connection creation if not needed
CONJS-268 importFile method doesn't always throw error when imported commands fails #253
CONJS-267 Ensure that option collation with id > 255 are respected
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 14 Sep 2023
MariaDB Connector/Node.js 3.2.1 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-262 Binary result-set parsing performance improvement, avoiding to chromium slow issue detail?id=7161
CONJS-265 permit configuration of console warning message to be exported
CONJS-266 Option infileStreamFactory
addition for compatibility
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 19 Jun 2023
MariaDB Connector/Node.js 3.2.0 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-250 'undefined' parameters are now permitted, for compatibility with mysql/mysql2 behavior
CONJS-257 permit to import sql file directly
CONJS-253 Node.js 20 is now tested and supported
importFile(options) → Promise
connection.importFile({file:'...', 'database': '...'}) → Promise
pool.importFile({file:'...', 'database': '...'}) → Promisepromise)
example:
await conn.importFile({
file: '/tmp/someFile.sql',
database: 'myDb'
});
CONJS-252 missing deprecated option supportBigNumbers and bigNumberStrings in Typescript
CONJS-254 ensuring option connectTimeout is respected : timeout is removed when socket is successfully established, in place of returning connection object. Wasn't set when using pipe/unix socket
CONJS-255 In some case, pipelining was use even option explicitly disable it
CONJS-256 method changeUser can lead to error when using multi-authentication and pipelining
CONJS-258 All eventEmitters methods are not available on connections
CONJS-259 SqlError sqlMessage property alias for text addition
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 3 May 2023
MariaDB Connector/Node.js 3.1.2 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-249 add connection.listeners function to permit TypeORM compatibility
CONJS-247 Improve error message when having set named parameter option and executing standard question mark command
CONJS-248 Ensuring not using importing file after pool.end() to permit Jest use
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 17 Mar 2023
MariaDB Connector/Node.js 3.1.1 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-246 pool not listening to 'error' event might exit application on error
CONJS-240 Repeating calling the same procedure gets a release prepare error.
CONJS-244 correction for node.js 12 compatibility
CONJS-245 batch failing when using bulk and metaAsArray
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 15 Feb 2023
MariaDB Connector/Node.js 3.1.0 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
CONJS-237 Connector now set session timezone, solving issue with time function, removing needs of client side conversion.
This requires that when using timezone options, to have corresponding server TZ data filled.
CONJS-230 better metadata parsing performance
CONJS-229 performance improvement when parsing lots of parameter
CONJS-238 faster execution for known length packet
see here for updated result compared to other connectors
CONJS-225 Make result set's meta property non-enumerable
CONJS-235 Allow to pass TypeScript generic types without need of "as"
CONJS-231 When executing batch with a parameter can be too long to fit in one mysql packet, parameter can have 4 byte missing
CONJS-236 datatype TIME wrong binary decoding when not having microseconds
CONJS-239 When using connection with callback, pre-commands (like initSql
) might not always be executed first
CONJS-232 in case of a long query running, connection.destroy() will close connection, but might leave server still running query for some time
CONJS-240 adding a Prepare result wrapper to avoid multiple close issue with cache
CONJS-241 metaAsArray missing option in typescript description
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 27 Oct 2022
MariaDB Connector/Node.js 3.0.2 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
Like queryStream, execute command can now be streamed as well for huge resultset, to avoid charging the whole resultset in memory. Example :
const prepare = await shareConn.prepare('SELECT * FROM mysql.user where host = ?');
const stream = prepare.executeStream(['localhost']);
try {
for await (const row of stream) {
console.log(row);
}
} catch (e) {
queryStream.close();
}
prepare.close();
CONJS-223 Metadata column name gets sporadic corrupted
CONJS-211 Session timezone unset on connection re-use with connection pool
CONJS-212 when throwing an error when using option leakDetectionTimeout
, might result in throwing wrong error with Cannot read properties of null (reading 'leaked')
CONJS-217 caching_sha2_password never succeed using FAST AUTHENTICATION. With correction, one less exchanges is done when connecting to a MySQL server
CONJS-219 prepare cache was not limited to prepareCacheLength
but can increase up to 2x the prepareCacheLength
value, leading to possible ER_MAX_PREPARED_STMT_COUNT_REACHED
CONJS-228 improving prepare cache performance
CONJS-226 missing typescript metaAsArray option and documentation
CONJS-213 update error code with recent MariaDB server
CONJS-215 Executing after prepare close throw an undescriptive error
CONJS-221 option debugLen and logParam are not documented
CONJS-227 Allow setting idleTimeout to 0
CONJS-214 missing pool.closed typescript definition
CONJS-216 remove please-upgrade-node dependency
CONJS-224 missing typescript checkNumberRange option definition
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 26 Jul 2022
MariaDB Connector/Node.js 3.0.1 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
Pool might return a common error ‘retrieve connection from pool timeout after XXXms’ in place of real error.[CONJS-200]
Trace option now works when using pool/cluster. It is recommended to activate the trace option in development Since driver is asynchronous, enabling this option to save initial stack when calling any driver methods. This allows having the caller method and line in the error stack, permitting error easy debugging. The problem is this error stack is created using Error.captureStackTrace that is very slow. To give an idea, this slows down by 10% a query like 'select * from mysql.user LIMIT 1', so not recommended in production. [CONJS-209]
const pool = mariadb.createPool({
host: 'mydb.com',
user: 'myUser',
connectionLimit: 5,
trace: true
});
await pool.query('wrong query');
/* will throw an error like :
SqlError: (conn=15868, no: 1064, SQLState: 42000) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1
sql: wrong query - parameters:[]
at Object.module.exports.createError (errors.js:57:10)
at ...
From event:
at Function._PARAM (\integration\test-pool.js:60:18)
at …
text: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'wrong query' at line 1",
sql: 'wrong query - parameters:[]',
fatal: false,
errno: 1064,
sqlState: '42000',
code: 'ER_PARSE_ERROR'
*/
Pool error description is improved indicating pool information, like [CONJS-208]:
SqlError: (conn=-1, no: 45028, SQLState: HY000) retrieve connection from pool timeout after 200ms
(pool connections: active=1 idle=0 limit=1)
at Object.module.exports.createError
…
node.js 18 supported [CONJS-197]
New option checkNumberRange
. When used in conjunction of decimalAsNumber
, insertIdAsNumber
or bigIntAsNumber
, if conversion to number is not exact, connector will throw an error. This permits easier compatibility with mysql/mysql2 and 2.x version driver version. [CONJS-198]
Performance enhancement for multi-rows resultset. Internal benchmarks show improved performance by 10% for a result-set of 1000 rows.[CONJS-210]
[CONJS-193] Wrong error returned "Cannot read properties of undefined… … (reading 'charset')" when error during handshake
[CONJS-194] Charset change using parameterized query fails with "Uncaught TypeError: opts.emit is not a function"
[CONJS-195] Error "cannot mix BigInt and other types" when parsing negative bigint
[CONJS-196] connection.close() is now really an alias or connection.release()
[CONJS-199] wrong return type for batch() on typescript
[CONJS-201] typecast geometry parsing error
[CONJS-202] support pre 4.1 error format for 'too many connection' error
[CONJS-203] encoding error for connection attributes when using changeUser with connection attributes
[CONJS-206] possible race condition on connection destroy when no other connection can be created
[CONJS-204] handle password array when using authentication plugin “pam_use_cleartext_plugin”
[CONJS-205] query hanging when using batch with option timeout in place of error thrown
For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Release date: 1 Mar 2022
MariaDB Connector/Node.js 3.0.0 is a Stable (GA) release.
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
see 3.0.0-rc for 3.0.0 content from previous version.
merged correction from 2.5.6
[CONJS-185] considering BIT(1) as boolean (option bitOneIsBoolean permit to disable that behavior for compatibility)
pool ensuring multi-request process order
set parser function once per result-set for better performance
For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 20 Oct 2021
MariaDB Connector/Node.js 3.0.0-rc is an RC release.
Do not use non-stable (non-GA) releases in production!
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
see 3.0.0-beta for 3.0.0 content from previous version.
Before 3.0, implementation ensure connection state, at the cost of not handling backpressure well.
Streaming a resultset ensured the connection state before version 3.0, at the cost of not handling backpressure well. Since the goal of queryStream is to avoid the use of a large amount of memory, handling of backpressure has been optimized. If data handling takes some amount of time, the socket is paused to avoid the node socket buffer growing indefinitely. This has an impact on the use of function stream.pipeline as queryStream now needs to be closed explicitly to ensure that a connection is not in a wrong state ( unhandled rows in the socket buffer). Example
const queryStream = connection.queryStream("SELECT * FROM mysql.user");
stream.pipeline(queryStream, transformStream, someWriterStream, (err) => { queryStream.close(); });
pool cluster option removeNodeErrorCount now default to infinity. This avoids having pool removed from cluster when a server temporarily fails.
pool option resetAfterUse now default to false. This permit avoids executing a command each time a connection is returned to pool.
The pool cluster option removeNodeErrorCount now defaults to infinity. This avoids that some pool is removed from the cluster when a server temporarily fails.
The pool option resetAfterUse now defaults to false. This avoids the execution of a COM_RESET each time a connection is returned to the pool.
stream
permits to set a function with parameter to set stream (since 3.0)
function
The option stream
provides a way to execute a function with a callback parameter before each connection stream creation.
This can permit setting a SSH Tunnel for example:
const mariadb = require('mariadb');
const tunnel = require('tunnel-ssh');
const fs = require('fs');
const conn = await mariadb.createConnection({
user: 'dbuser',
password: 'dbpwd',
port: 27000,
stream: (cb) =>
tunnel(
{
// remote connection ssh info
username: 'sshuser',
host: '157.230.123.7',
port: 22,
privateKey: fs.readFileSync('./key.ppk'),
// database (here on ssh server)
dstHost: '127.0.0.1',
dstPort: 3306,
// local interface
localHost: '127.0.0.1',
localPort: 27000
},
cb
)
});
[CONJS-125] Batch operations now support the returning clause (example command like insert into XXX values (?,?,?) returning id
)
[CONJS-125] permit using batch with returning clause
[CONJS-170] Pool.query(undefined) never release connection
[CONJS-173] not permitting providing null as a value without an array
[CONJS-178] Update code to recent Ecma version
[CONJS-172] performance improvement for multi-line result-set
For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.
This page is: Copyright © 2025 MariaDB. All rights reserved.
The most recent Stable (GA) release of MariaDB Connector/Node.js is:
Download | Release Notes | Changelog | Connector/Node.js Overview
Release date: 30 Jun 2021
MariaDB Connector/Node.js 3.0.0 is a Beta release.
Do not use beta releases in production!
For an overview of MariaDB Connector/Node.js see the About MariaDB Connector/Node.js page
Driver now permits using prepared statement. This methods are compatible with mysql2 with some differences:
permit streaming parameters
execute use by default a prepared cache that hasn't infinite length (option ‘prepareCacheLength’ with default to 256)
Implement mariadb 10.6 new feature, skipping metadata when possible for better performance
New Connection methods:
connection.prepare(sql) → Promise: Prepares a query.
connection.execute(sql[, values]) → Promise: Prepare and Executes a query.
Example:
const prepare = await conn.prepare('INSERT INTO mytable(id,val) VALUES (?,?)');
await prepare.execute([1, 'val1']);
prepare.close();
Or directly :
await conn.execute('INSERT INTO mytable(id,val) VALUES (?,?)', [1, 'val1']);
If reusing query multiple time, this permits to perform better, specifically using mariadb 10.6. Performance comparison with mysql2 driver show up to 20% performance gain. More info will follow before GA release.
Default behaviour for decoding BIGINT / DECIMAL datatype for 2.x version and mysql/mysql2 drivers return a javascript Number object. BIGINT / DECIMAL values might not be in the safe range, resulting in approximate results.
Since 3.x version, driver has reliable default, returning:
DECIMAL => javascript String
BIGINT => javascript BigInt object
For compatibility with the previous versions or mysql/mysql driver, 3 options have been added to return BIGINT/DECIMAL as Number, like previous defaults.
insertIdAsNumber
Whether the query should return last insert id from INSERT/UPDATE command as BigInt or Number. default return BigInt
boolean
false
decimalAsNumber
Whether the query should return decimal as Number. If enabled, this might return approximate values.
boolean
false
bigIntAsNumber
Whether the query should return BigInt data type as Number. If enabled, this might return approximate values.
boolean
false
Previous options supportBigNumbers
and bigNumberStrings
still exist for compatibility, but are now deprecated.
Driver permit mapping the logs to an external logger. There is 3 caller functions:
network(string): called for each network exchange.
query(string): called for each commands
error(Error): called for each error.
if setting one function, function will be used for all loggers. (ie. logger: console.log === logger: { network: console.log, query: console.log, error: console.log})
Example:
const mariadb = require('mariadb');
const winston = require('winston');
const logger = winston.createLogger({
level: 'info',
transports: [
// - Write all logs with level `error` and below to `error.log`
// - Write all logs with level `info` and below to `combined.log`
new winston.transports.Console({ filename: 'error.log', level: 'error' }),
new winston.transports.Console({ filename: 'combined.log' })
]
});
const pool = mariadb.createPool({
host: 'mydb.com',
user:'myUser',
password: 'myPwd',
logger: {
network: (msg) => logger.silly(msg),
query: (msg) => logger.info(msg),
error: (err) => logger.error(err),
}
});
For a complete list of changes made in this release, with links to detailed information on each push, see the changelog.
This page is: Copyright © 2025 MariaDB. All rights reserved.