Constructor
new OracleDialect(priv, connConf, track, errorLoggeropt, loggeropt, debugopt)
Constructor
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
priv |
Manager~PrivateOptions
|
The private configuration options |
|
connConf |
OracleConnectionOptions
|
The individual SQL connection configuration for the given dialect that was passed into the originating |
|
track |
Object
|
Container for sharing data between |
|
errorLogger |
function
|
<optional> |
A function that takes one or more arguments and logs the results as an error (similar to |
logger |
function
|
<optional> |
A function that takes one or more arguments and logs the results (similar to |
debug |
Boolean
|
<optional> |
A flag that indicates the dialect should be run in debug mode (if supported) |
Members
Methods
(async) beginTransaction(txId)
Begins a transaction by opening a connection from the pool
Parameters:
Name | Type | Description |
---|---|---|
txId |
String
|
The transaction ID that will be started |
(async) close() → {Integer}
Closes the Oracle connection pool
Returns:
- Type:
-
Integer
The number of connections closed
(async) exec(sql, opts, frags) → {Array.<Object>|Error}
Executes a SQL statement
Parameters:
Name | Type | Description |
---|---|---|
sql |
String
|
the SQL to execute |
opts |
OracleDExecOptions
|
The execution options |
frags |
Array.<String>
|
the frament keys within the SQL that will be retained |
Returns:
- Type:
-
Array.<Object>
|Error
The result set, if any (or an error when returning errors instead of throwing them)
(async, protected) getConnection(pool, optsopt) → {Object}
Gets the currently open connection or a new connection when no transaction is in progress
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pool |
Object
|
The connection pool |
|
opts |
OracleDExecOptions
|
<optional> |
The execution options |
Returns:
- Type:
-
Object
The connection (when present)
(async) init(opts) → {Object}
Initializes OracleDialect
by creating the connection pool
Parameters:
Name | Type | Description |
---|---|---|
opts |
Dialect~DialectInitOptions
|
The options described by the |
Returns:
- Type:
-
Object
the Oracle connection pool (or an error when returning errors instead of throwing them)