this class is used to handle all drivers, loading them, unloading them etc. More...
#include <cppdb/driver_manager.h>
Public Member Functions | |
void | install_driver (std::string const &name, ref_ptr< backend::driver > drv) |
void | collect_unused () |
void | add_search_path (std::string const &) |
void | clear_search_paths () |
void | use_default_search_path (bool v) |
backend::connection * | connect (connection_info const &ci) |
backend::connection * | connect (std::string const &connectoin_string) |
Static Public Member Functions | |
static driver_manager & | instance () |
this class is used to handle all drivers, loading them, unloading them etc.
All its member functions are thread safe
void cppdb::driver_manager::add_search_path | ( | std::string const & | ) |
Add a path were the driver should search for loadable modules
Clear previously added a paths
Unload all drivers that have no more open connections.
backend::connection* cppdb::driver_manager::connect | ( | connection_info const & | ci | ) |
Create a new connection object using parsed connection string ci
backend::connection* cppdb::driver_manager::connect | ( | std::string const & | connectoin_string | ) |
Create a new connection object using connection string connectoin_string
void cppdb::driver_manager::install_driver | ( | std::string const & | name, |
ref_ptr< backend::driver > | drv | ||
) |
Install new driver drv named name to the manager.
static driver_manager& cppdb::driver_manager::instance | ( | ) | [static] |
Get the singleton instance of the class
void cppdb::driver_manager::use_default_search_path | ( | bool | v | ) |
Search the library under default directory (i.e. empty path prefix) or not, default is true