AbstractDbManager
DbManager class. Provides backend feature for managing databases. Implements a singleton pattern - each subclass has its own unique instance.
Implementation must define fillowing properties
:property db: Database Proxy
:type db: DatabaseProxy
db: DatabaseProxymode: OptionalCheck if the database connection is working
boolClose the db connection
Open the db connection
Create the tables for the provided models
listDrop the tables for the provided models
listExecute the provided sql command
strstrLiteralDbConfigGet the db object
DatabaseProxyGet the db object
LiteralReturn the name of the DbManager. The combination of brick name and unique name must be unique accross all DbManager inheritors.
strstrCheck if there is an active transaction
boolIf True, errors during initialization from DbManagerService will be ignored If False, errors during initialization will raise exceptions
Useful if the database need to be initialized manually later (eg: downloaded first)
boolInitialize the DbManager
LiteralReturn if the db manager was initialized
boolIf True, the db will be initialized after the app start, and app won't fail if db is not available If False, the db will be initialized immediately (not recommended), and app fails if db is not available
boolTest if the mysql engine is active
Register a hook to be called after a transaction is committed
CallableClose all db managers
Get all the classes that inherit this class
setGet the singleton instance of this DbManager subclass
Must be called implement in sub concrete classes.
AbstractDbManagerReconnect all db managers
Decorator to create a new transaction around a method If an exception is raised, the transaction is rolled back
Can also be used as a context manager.
bool - FalseCallable