This class is the major gateway to new connections. More...
#include <cppdb/conn_manager.h>
Public Member Functions | |
ref_ptr< backend::connection > | open (std::string const &cs) |
ref_ptr< backend::connection > | open (connection_info const &ci) |
void | gc () |
Static Public Member Functions | |
static connections_manager & | instance () |
This class is the major gateway to new connections.
It handles connection pools and forwards request to the drivers.
This class member functions are thread safe
void cppdb::connections_manager::gc | ( | ) |
Collect all connections that were not used for long time and close them.
static connections_manager& cppdb::connections_manager::instance | ( | ) | [static] |
Get a singleton instance of the class
ref_ptr<backend::connection> cppdb::connections_manager::open | ( | std::string const & | cs | ) |
Create a new connection using connection string cs
Create a new connection using parsed connection string ci