CARMA C++
|
creating a database connection via the static createConnection() method More...
Static Public Member Functions | |
static DBConnection * | createConnection (const DBConfigurator *dbconf=NULL) |
connect to the carma database. More... | |
creating a database connection via the static createConnection() method
Definition at line 539 of file DBConnection.h.
|
static |
connect to the carma database.
clients must delete the returned DBConnection when they are done with it. The function uses the rdbms key supplied by the DBConfigurator oject to determine which rdbms backend to connect to. If the dbconf==NULL or the rdbms key in the non-null dbconf object isn't defined, this method uses the value of carma::dbms::DEFAULT_RDBMS as the rdbms to connect to. This method passes the same DBConfigurator point on to the DBConnection constructor which uses several other keys to configure the return DBConnection object
dbconf | the DBConfigurator object from which to get various configuration parameters, if NULL use sensible defaults |
DBConnectionException | if a connection cannot be established |