Global

Type Definitions

MDBConnectionDriverOptions

The mariadb (w/MySQL support) module specific options. Both connection and pool will be merged when generating the connection pool.

Properties:
Name Type Attributes Description
connection Object <optional>

An object that will contain properties/values that will be used to construct the MariaDB + MySQL connection (e.g. { database: 'mydb', timezone: '-0700' }). See the mariadb module documentation for a full listing of available connection options. When a property value is a string surrounded by ${}, it will be assumed to be a property that resides on either the SQLERPrivateOptions passed into the Manager constructor or a property on the MDBConnectionOptions itself (in that order of precedence). For example, connOpts.host = '127.0.0.1' and driverOptions.connection.host = '${host}' would be interpolated into driverOptions.connection.host = '127.0.0.1'. In contrast to privOpts.username = 'someUsername' and driverOptions.connection.user = '${username}'would be interpolated intodriverOptions.connection.user = 'someUsername'. Interpoaltions can also contain more than one reference. For example, driverOptions.connection.someProp = '${protocol}:${host}'for privOpts = { protocol: 'TCP', host: 'example.com' }would becomesomeProp='TCP:example.com'`.

pool Object <optional>

The pool conf options that will be passed into mariadb.createPool(conf). See the mariadb module for a full listing of avialable connection pooling options. Using any of the generic pool.someOption will override the conf options set on driverOptions.pool (e.g. pool.max = 10 would override driverOptions.pool.connectionLimit = 20). When a value is a string surrounded by ${}, it will be assumed to be a constant property that resides on the mariadb module and will be interpolated accordingly. For example driverOptions.pool.someProp = '${SOME_MARIADB_CONSTANT}' will be interpolated as pool.someProp = mariadb.SOME_MARIADB_CONSTANT.

Source:
Type:
  • Object

MDBConnectionOptions

MariaDB + MySQL specific extension of the SQLERConnectionOptions from the sqler module.

Properties:
Name Type Description
driverOptions MDBConnectionDriverOptions

The mariadb (w/MySQL support) module specific options. Both connection and pool will be merged when generating the connection pool.

Source:
Type:
  • Object

MDBExecDriverOptions

MariaDB + MySQL specific extension of the SQLERExecOptions from the sqler module. When a property of binds contains an object it will be interpolated for property values on the mariadb module. For example, binds.name = '${SOME_MARIADB_CONSTANT}' will be interpolated as binds.name = mariadb.SOME_MARIADB_CONSTANT.

Properties:
Properties
Name Type Attributes Description
preparedStatementDatabase String <optional>

The database name to use when generating prepared statements for the given execution. Since prepared statements are scoped only for a given connection and a temporary stored procedure is used to execute prepared statements, preparedStatementDatabase is required when execOpts.prepareStatement = true.

exec Object <optional>

The options passed into execution/query functions provided by the mariadb module performed during Manager.exec. When a value is a string surrounded by ${}, it will be assumed to be a constant property that resides on the mariadb module and will be interpolated accordingly. For example driverOptions.exec.someDriverProp = '${SOME_MARIADB_CONSTANT}' will be interpolated as driverOptions.exec.someDriverProp = mariadb.SOME_MARIADB_CONSTANT.

Name Type Attributes Default Description
namedPlaceholders Boolean <optional>
true

Truthy to use named parameters in MariaDB/MySQL or falsy to convert the named parameters into a positional array of bind values.

Source:
Type:
  • Object

MDBExecOptions

MariaDB + MySQL specific extension of the SQLERExecOptions from the sqler module. When a property of binds contains an object it will be interpolated for property values on the mariadb module. For example, binds.name = '${SOME_MARIADB_CONSTANT}' will be interpolated as binds.name = mariadb.SOME_MARIADB_CONSTANT.

Properties:
Name Type Attributes Description
driverOptions MDBExecDriverOptions <optional>

The mariadb module specific options.

Source:
Type:
  • Object

3.1.1 (2021-08-20)

Full Changelog

Features: