new DBConnection(index: number)#

Class for database access. Databases are defined in config file

Members

inTransactioninstance #

Is database in transaction

Methods

commit()→booleaninstance#

Commit transaction. If transaction is not started return false

exec(sql: string, params: Object)→booleaninstance#

Execute sql

genID(entity: string)→numberinstance#

Generate ID for entity

rollback()→booleaninstance#

Rollback transaction. If transaction is not started return false

run(sql: string, params: Object)→stringinstance#

Run select sql and return result

startTransaction()→booleaninstance#

Start transaction. If transaction is already started return false