Indicate if an array is included in parentheses. This option permits compatibility with the connector version < 2.5
indicate if JSON fields for MariaDB server 10.5.2+ result 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 enough. for example, 'UTF8MB4', 'CP1250'. (default 'UTF8MB4')
indicate to throw an exception if a result-set does not contain some data due to having duplicate identifier (Default: true)
Throw if conversion to Number is not safe.
Default: false;
Permit defined collation used for connection. This will define 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 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, the server can display client information on each connection.
The milliseconds before a timeout occurs during the initial connection to the MySQL server. (Default: 1000)
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 the 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)
When a connection is established, permit executing commands before using connection
force returning insertId as Number in place of BigInt
Default: false;
permit enabling socket keeping alive, setting delay. 0 means aren't enabled. Keep in mind that this doesn't reset server @@wait_timeout (use pool option idleTimeout for that). in ms (Default: 0)
Debug option: permit saving last exchanged packet. Error messages will display those last exchanged packet.
(Default: false)
indicate if parameters must be logged by query logger (Default: false)
Configure logger
permit indicating server global variable max_allowed_packet value to ensure efficient batching. default is 4Mb. see batch documentation
Compatibility option, causes Promise to return an array object,
[rows, metadata] rather than the rows as JSON objects with a meta property.
Default to false.
make result-set metadata property enumerable. Default to false.
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.
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 you 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 a prepared statement
default to 256.
Allows timeout for command execution.
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 setting 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
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 casting result types.
The MySQL user to authenticate as
Permit to defined function calling for LOAD LOCAL command, for extra verification like path restriction.
Permit setting stream.
Generated using TypeDoc
Indicate that if
rsaPublicKeyorcachingRsaPublicKeypublic key are not provided, if client can ask server to send public key. default: false