![]() |
AnCH Framework
0.1
Another C++ Hack Framework
|
SQL namespace. More...
Classes | |
| class | Connection |
| SQL connection virtual class. More... | |
| class | MySQLConnection |
| MySQL connection. More... | |
| class | MySQLResultSet |
| MySQL result set implementation. More... | |
| class | PostgreSQLConnection |
| PostgreSQL connection. More... | |
| class | PostgreSQLResultSet |
| PostgreSQL result set implementation. More... | |
| class | ResultSet |
| SQL result representation. More... | |
| struct | SqlConnectionConfiguration |
| SQL database connection configuration. More... | |
| class | SqlConnectionFactory |
| SQL connection factory. More... | |
| class | SqlException |
| SQL exception. More... | |
| class | SQLite3Connection |
| SQLite3 connection. More... | |
| class | SQLite3ResultSet |
| SQLite3 result set implementation. More... | |
Typedefs | |
| using | SqlConnectionPool = anch::ResourcePool< Connection, SqlConnectionConfiguration, make_shared_connection > |
Functions | |
| std::shared_ptr< Connection > | make_shared_connection (const SqlConnectionConfiguration &config) throw (SqlException) |
| template<> | |
| bool | ResultSet::get< std::string > (std::size_t idx, std::string &out) throw (SqlException) |
| template<> | |
| const std::string * | ResultSet::get< std::string > (std::size_t idx) throw (SqlException) |
SQL namespace.
Provides abstraction layer for several SQL clients.
Supported SQL database are (for now):
| using anch::sql::SqlConnectionPool = typedef anch::ResourcePool<Connection, SqlConnectionConfiguration, make_shared_connection> |
SQL connections pool definition
| std::shared_ptr<Connection> anch::sql::make_shared_connection | ( | const SqlConnectionConfiguration & | config | ) | |
| throw | ( | SqlException | |||
| ) | |||||
Create a new shared pointer on SQL connection.
| config | the SQL database configuration |
| SqlException | any error |
| bool anch::sql::ResultSet::get< std::string > | ( | std::size_t | idx, |
| std::string & | out | ||
| ) | |||
| throw | ( | SqlException | |
| ) | |||
Get field string value by index.
The output parameter will be set only if SQL result is not NULL.
| idx | the index |
| out | the result |
true if result is NULL, false otherwise| SqlException | any error |
| const std::string* anch::sql::ResultSet::get< std::string > | ( | std::size_t | idx | ) | |
| throw | ( | SqlException | |||
| ) | |||||
Get field string value by index.
You have to delete result once treated.
| idx | the index |
| SqlException | any error |
1.8.11