SQL shared libraries manager. More...
#include <sqlSharedLibraries.hpp>
Public Member Functions | |
| void | registerSQLLibrary (const std::string &db, const std::string &library) |
| std::shared_ptr< Connection > | makeSharedConnection (const SqlConnectionConfiguration &config) |
| Connection * | makeConnection (const SqlConnectionConfiguration &config) |
| Public Member Functions inherited from anch::Singleton< SQLSharedLibraries > | |
| Singleton & | operator= (const Singleton &)=delete |
Static Public Member Functions | |
| static void | registerMySQL () |
| static void | registerPostgreSQL () |
| static void | registerSQLite () |
| Static Public Member Functions inherited from anch::Singleton< SQLSharedLibraries > | |
| static SQLSharedLibraries & | getInstance () |
Friends | |
| class | anch::Singleton< SQLSharedLibraries > |
Additional Inherited Members | |
| Protected Member Functions inherited from anch::Singleton< SQLSharedLibraries > | |
| Singleton () noexcept=default | |
| ~Singleton ()=default | |
SQL shared libraries manager.
| Connection * anch::sql::SQLSharedLibraries::makeConnection | ( | const SqlConnectionConfiguration & | config | ) |
Make new SQL connection
| config | the database configuration |
| SqlException | when database has not been registered |
| std::shared_ptr< Connection > anch::sql::SQLSharedLibraries::makeSharedConnection | ( | const SqlConnectionConfiguration & | config | ) |
Make shared SQL connection
| config | the database configuration |
| SqlException | when database has not been registered |
|
static |
Register MySQL driver utlility method
|
static |
Register PostgreSQL driver utlility method
|
static |
Register SQLite3 driver utlility method
| void anch::sql::SQLSharedLibraries::registerSQLLibrary | ( | const std::string & | db, |
| const std::string & | library ) |
Register SQL library.
This method will not open the libraries.
| db | the database client/server name which will be used in configuration file |
| library | the library name |