new DBConnection(index : number) #

Class for database access. Databases are defined in config file

Members

inTransaction instance #

Is database in transaction

Methods

commit()→boolean instance #

Commit transaction. If transaction is not started return false

exec(sql : string, params : Object)→boolean instance #

Execute sql

genID(entity : string)→number instance #

Generate ID for entity

rollback()→boolean instance #

Rollback transaction. If transaction is not started return false

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

Run select sql and return result

startTransaction()→boolean instance #

Start transaction. If transaction is already started return false