declaration of the entry point of the db abstraction layer. this class has the capacity to set the type of the db driver we want to use, connect to a database and return a #Connection object.
More...
#include <nmv-connection-manager.h>
declaration of the entry point of the db abstraction layer. this class has the capacity to set the type of the db driver we want to use, connect to a database and return a #Connection object.
◆ create_db_connection() [1/2]
| static ConnectionSafePtr nemiver::common::ConnectionManager::create_db_connection |
( |
| ) |
|
|
static |
create a connection to the default database. The default database is the one configured by the user by filling the file nemiver.conf.
- Returns
- a smart pointer to a useable db connection. Throws an Exception if it fails.
◆ create_db_connection() [2/2]
connect to a db specified by a uri note that this function throws an #Exception if fails.
- Parameters
-
| a_connection_string | a uri specifing the db we want to connect to. the uri ressembles: vdbc:dbtypename://[host:[port]]/[nameofthedbinstance] |
| a_user | the username to access the db |
| a_pass | the password to access the db |
| a_connection | out parameter. The connection initialized by the function upon successful completion. |
◆ get_db_type()
| static const char* nemiver::common::ConnectionManager::get_db_type |
( |
| ) |
|
|
static |
get the type of database we are using.
- Returns
- a null terminated string that may be "mysql", "sqlite" etc ...
The documentation for this class was generated from the following file: