Indicate that if rsaPublicKey
or cachingRsaPublicKey
public key are not provided, if client can ask server
to send public key.
default: false
Indicate if array are included in parenthesis. This option permit compatibility with version < 2.5
indicate if JSON fields for MariaDB server 10.5.2+ results in JSON format (or String if disabled)
Force returning BIGINT data as Number in place of BigInt.
Default: false;
disabled bulk command in batch.
Indicate path/content to MySQL server caching RSA public key. use requires Node.js v11.6+
Protocol character set used with the server. Connection collation will be the default collation associated with charset. It's mainly used for micro-optimizations. The default is often sufficient. example 'UTF8MB4', 'CP1250'. (default 'UTF8MB4')
indicate to throw an exception if result-set will not contain some data due to having duplicate identifier (Default: true)
Permit to defined collation used for connection. This will defined the charset encoding used for exchanges with database and defines the order used when comparing strings. It's mainly used for micro-optimizations (Default: 'UTF8MB4_UNICODE_CI')
Compress exchanges with database using gzip. This can give you better performance when accessing a database in a different location. (Default: false)
When enabled, sends information during connection to server
If JSON is set, add JSON key/value to those values.
When Performance Schema is enabled, server can display client information on each connection.
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 1000)
The maximum number of connections to create at once. (Default: 10)
Name of the database to use for this connection
Whether to retrieve dates as strings or as Date objects.
This will print all incoming and outgoing packets on stdout. (Default: false)
This will print all incoming and outgoing compressed packets on stdout. (Default: false)
When debugging, maximum packet length to write to console. (Default: 256)
force returning decimal values as Number in place of String
Default: false;
Force server version check by explicitly using SELECT VERSION(), not relying on server initial packet. (Default: false)
When enabled, the update number corresponds to update rows. When disabled, it indicates the real rows changed.
The hostname of the database you are connecting to. (Default: localhost)
Indicate idle time after which a pool connection is released. Value must be lower than @@wait_timeout. In seconds (0 means never release) Default: 1800 ( = 30 minutes)
When a connection is established, permit to execute commands before using connection
Timeout after which pool give up creating new connection.
force returning insertId as Number in place of BigInt
Default: false;
permit to enable socket keep alive, setting delay. 0 means not enabled. Keep in mind that this don't reset server @@wait_timeout (use pool option idleTimeout for that). in ms (Default: 0)
Permit to indicate a timeout to log connection borrowed from pool. When a connection is borrowed from pool and this timeout is reached, a message will be logged to console indicating a possible connection leak. Another message will tell if the possible logged leak has been released. A value of 0 (default) meaning Leak detection is disable
Debug option : permit to save last exchanged packet. Error messages will display those last exchanged packet.
(Default: false)
Configure logger
permit to indicate server global variable max_allowed_packet value to ensure efficient batching. default is 4Mb. see batch documentation
When asking a connection to pool, the pool will validate the connection state. "minDelayValidation" permits disabling this validation if the connection has been borrowed recently avoiding useless verifications in case of frequent reuse of connections. 0 means validation is done each time the connection is asked. (in ms) Default: 500 (in millisecond)
Permit to set a minimum number of connection in pool. Recommendation is to use fixed pool, so not setting this value
Allow multiple mysql statements per query. Be careful with this, it exposes you to SQL injection attacks. (Default: false)
Allows the use of named placeholders.
Presents result-sets by table to avoid results with colliding fields. See the query() description for more information.
No rollback or reset when releasing a connection to pool. Default: false
The password of that MySQL user
Allows the use of LOAD DATA INFILE statements. Loading data from a file from the client may be a security issue, as a man-in-the-middle proxy server can change the actual file the server loads. Being able to execute a query on the client gives you access to files on the client. (Default: false)
Compatibility option to permit setting multiple value by a JSON object to replace one question mark. key values will replace the question mark with format like key1=val,key2='val2'. Since it doesn't respect the usual prepared statement format that one value is for one question mark, this can lead to incomprehension, even if badly use to possible injection.
Sends queries one by one without waiting on the results of the previous entry. (Default: true)
The port number to connect to. (Default: 3306)
Indicate prepare cache size when using prepared statement
default to 256.
Use COM_STMT_RESET when releasing a connection to pool. Default: true
Return result-sets as array, rather than a JSON object. This is a faster way to get results
Indicate path/content to MySQL server RSA public key. use requires Node.js v11.6+
Permit to set session variables when connecting. Example: sessionVariables:{'idle_transaction_timeout':10000}
The path to a unix domain socket to connect to. When used host and port are ignored
Socket timeout in milliseconds after the connection is established
object with ssl parameters or a boolean to enable ssl without setting any other ssl option. see https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/connection-options.md#ssl for more information
Allows timeout for command execution.
Forces use of the indicated timezone, rather than the current Node.js timezone. Possible values are Z for UTC, local or ±HH:MM format
Adds the stack trace at the time of query creation to the error stack trace, making it easier to identify the part of the code that issued the query. Note: This feature is disabled by default due to the performance cost of stack creation. Only turn it on when you need to debug issues. (Default: false)
Allows to cast result types.
The MySQL user to authenticate as
Permit to set stream.
Generated using TypeDoc
The milliseconds before a timeout occurs during the connection acquisition. This is slightly different from connectTimeout, because acquiring a pool connection does not always involve making a connection. (Default: 10 seconds)