CARMA C++
carma::dbms::DBConnectionFactory Class Reference

creating a database connection via the static createConnection() method More...

Static Public Member Functions

static DBConnectioncreateConnection (const DBConfigurator *dbconf=NULL)
 connect to the carma database. More...
 

Detailed Description

creating a database connection via the static createConnection() method

Definition at line 539 of file DBConnection.h.

Member Function Documentation

static DBConnection* carma::dbms::DBConnectionFactory::createConnection ( const DBConfigurator dbconf = NULL)
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

Parameters
dbconfthe DBConfigurator object from which to get various configuration parameters, if NULL use sensible defaults
Returns
pointer to a DBConnection object, this pointer must be deleted by the client when the client is finished with the connection to avoid memory leaks!
Exceptions
DBConnectionExceptionif a connection cannot be established
See Also
DBConnection

The documentation for this class was generated from the following file: