Class for database access. Databases are defined in config file
Is database in transaction
Commit transaction. If transaction is not started return false
Execute parsed (without inline parameters) sql statement
Generate ID for entity
Rollback transaction. If transaction is not started return false
Run select sql and return result
For Postgres wrap a func call into temporary savepoint.
In case func throws savepoint is rollback'ed and error is re-trowed, otherwise checkpoint is released.
For other RDBMS execute func as is.
Return a func result.
Start transaction. If transaction is already started return false