Implementation to close the connection, if forceClose
is true, close the connection no matter what.
Silently error if it means the connection is closed.
boolean, if true
, should close the connection no matter what.
Promise
Implementation method to return a dataset from the database
The database query
The query parameters
Promise
Implementation method to return a dataset from the database like query()
,
but returns a Readable
stream instead.
The database query
The query parameters
Readable
stream options
Readable
Closes the connection. May error if connection has an active transaction.
if forceClose
boolean is true, it will force close the connection, regardless
of transaction state.
optional boolean
Promise
Commits a transaction. This will end a transaction.
Promise
Ends a transaction. if requiresRollback
is true
, then rollback()
is invoked. Otherwise, commit()
is invoked.
optional boolean
Promise
Gets the underlying Database API
any
Gets the callback stacktrace to determine what opened this connection. Useful for debugging lingering connections.
string - A stacktrace
Returns the current timeout setting
number in milliseconds
Returns true if the connection has been closed.
Returns true if connection was created without write access
boolean
Implementation method to determine if the connection is in an active transaction.
boolean
Queries the database for a dataset.
The database query
Parameters for the query
Promise
Rollsback a transaction. This will end a transaction.
Promise
Sets the timeout of this connectino
in milliseconds
Implementation method to start a transaction.
Promise
The database query
Parameters for the query
Stream options
Readable
Generated using TypeDoc
Do not call
new Database
directly. UseDatabase.getConnection
to create aDatabaseConnection
object.IDatabaseConnection