new ConnectionManagerBase()

Creates a new connection manager object.

Methods

abstract
beginTransaction(dataSource, callback) → object

Returns a new connection of the named data source after having started a new transaction. If the data source does not support transactions, returns a new connection only.

Parameters

Name Type Optional Description

dataSource

string

 

The name of the data source.

callback

external.cbConnectionManager

 

The callback function (for asynchronous models).

Returns

object The new connection with initiated transaction (for synchronous models).

abstract
commitTransaction(dataSource, connection, callback) → object

Finalizes the current transaction and closes the connection of the data source. If the data source does not support transactions, closes the given connection only.

Parameters

Name Type Optional Description

dataSource

string

 

The name of the data source.

connection

object

 

The connection to be closed.

callback

external.cbConnectionManager

 

The callback function (for asynchronous models).

Returns

object The closed connection (for synchronous models).

abstract
openConnection(dataSource, connection, callback) → object

Closes the given connection of the data source.

Parameters

Name Type Optional Description

dataSource

string

 

The name of the data source.

connection

object

 

The connection to be closed.

callback

external.cbConnectionManager

 

The callback function (for asynchronous models).

Returns

object The closed connection (for synchronous models).

abstract
openConnection(dataSource, callback) → object

Returns a new connection of the named data source.

Parameters

Name Type Optional Description

dataSource

string

 

The name of the data source.

callback

external.cbConnectionManager

 

The callback function (for asynchronous models).

Returns

object The new connection (for synchronous models).

abstract
rollbackTransaction(dataSource, connection, callback) → object

Cancels the current transaction and closes the connection of the data source. If the data source does not support transactions, closes the given connection only.

Parameters

Name Type Optional Description

dataSource

string

 

The name of the data source.

connection

object

 

The connection to be closed.

callback

external.cbConnectionManager

 

The callback function (for asynchronous models).

Returns

object The closed connection (for synchronous models).