#include <Database.h>
Public Member Functions | |
| Database (std::string dsn) | |
| Constructor creates the database connection. | |
| Query | newQuery () const |
| Creates a query object for this database. | |
| void | voidQuery (const std::string &query) const |
| void Query, query the database and don't worry about return types or if its a successful query. | |
| long | intQuery (const std::string &query) const |
| long Query, query the database for a single integer result. | |
| std::string | strQuery (const std::string &query, long bufSize=1000) const |
| A Query interface that returns a string result. | |
| const SQLHDBC | getConnectionHandle () const |
| Function to retrieve the database connection handle. | |
| virtual | ~Database () |
| Destructor. | |
Static Public Member Functions | |
| static const std::string | escapeString (const std::string &input) |
| Escapes special characters in a string to be sent as part of a database query. | |
| static const std::string | boolToStr (const bool in) |
| Converts a boolean input to the equivalent database value. | |
Protected Attributes | |
| SQLHDBC | connectionHandle |
| ODBC connection handle. | |
| SQLHENV | odbc_environment_handle |
| ODBC environment handle. | |
Classes | |
| class | Exception |
| This class is thrown in case of any database exception. More... | |
| class | NoDataException |
| Exception class thrown when no data is available. More... | |
complete.cpp, and simple.cpp.
|
|
Constructor creates the database connection.
|
|
|
Converts a boolean input to the equivalent database value.
|
|
|
Escapes special characters in a string to be sent as part of a database query.
|
|
|
Function to retrieve the database connection handle.
|
|
|
long Query, query the database for a single integer result.
|
|
|
Creates a query object for this database.
|
|
||||||||||||
|
A Query interface that returns a string result.
|
|
|
void Query, query the database and don't worry about return types or if its a successful query.
|
|
|
ODBC environment handle. This handle is created by the constructor and freed in the destructor. |