by QxOrm admin » Thu Dec 09, 2010 8:30 am
Hi,
The class "qx::QxSqlDatabase" can be used to set parameters to connect to the database (it's a singleton).
QxOrm library will create automatically a connection per thread.
If you want to manage your own database connection pool, you can do this with QxOrm library.
Indeed, all functions under namespace qx::dao to communicate with database have a parameter "QSqlDatabase * pDatabase" ("QSqlDatabase" is an object of QtSql library, so you can find a documentation) :
- by default this parameter is set to "null" => so QxOrm manages connection to database automatically.
- you can set your own "QSqlDatabase" if you have a connection pool.