OdbcDialect

OdbcDialect

ODBC Dialect implementation for sqler

Constructor

new OdbcDialect(priv, connConf, track, errorLoggeropt, loggeropt, debugopt)

Constructor

Source:
Parameters:
Name Type Attributes Description
priv Manager~PrivateOptions

The private configuration options

connConf OdbcConnectionOptions

The individual SQL connection configuration for the given dialect that was passed into the originating Manager

track Manager~Track

Container for sharing data between Dialect instances.

errorLogger function <optional>

A function that takes one or more arguments and logs the results as an error (similar to console.error)

logger function <optional>

A function that takes one or more arguments and logs the results (similar to console.log)

debug Boolean <optional>

A flag that indicates the dialect should be run in debug mode (if supported)

Members

(protected) driver

Source:

state

Source:

Methods

(async) beginTransaction(txId)

Begins a transaction by opening a connection from the pool

Source:
Parameters:
Name Type Description
txId String

The transaction ID that will be started

(async) close() → {Integer}

Closes the ODBC connection pool

Source:
Returns:
Type:
Integer

The number of connections closed

(async) exec(sql, opts, frags, meta, errorOptsopt) → {Dialect~ExecResults}

Executes a SQL statement

Source:
Parameters:
Name Type Attributes Description
sql String

the SQL to execute

opts OdbcExecOptions

The execution options

frags Array.<String>

the frament keys within the SQL that will be retained

meta Manager~ExecMeta

The SQL execution metadata

errorOpts Manager~ExecErrorOptions | Boolean <optional>

The error options to use

Returns:
Type:
Dialect~ExecResults

The execution results

(async, protected) getConnection(opts, beginopt) → {Object}

Gets the currently open connection or a new connection when no transaction is in progress

Source:
Parameters:
Name Type Attributes Description
opts OdbcExecOptions

The execution options

begin Boolean <optional>

Truthy when the opts.transactionId is beng started

Returns:
Type:
Object

The connection (when present)

(async) init(opts) → {Object}

Initializes OdbcDialect by creating the connection pool

Source:
Parameters:
Name Type Description
opts Dialect~DialectInitOptions

The options described by the sqler module

Returns:
Type:
Object

The ODBC connection pool


1.2.1 (2020-06-12)

Full Changelog

Fixes: