Database interface.
More...
#include <Database.h>
| trippingcyril::database::Database::Database |
( |
const Module * |
pModule = NULL | ) |
|
|
inline |
General constructor
- Parameters
-
| pModule | The module to register this database on |
| virtual trippingcyril::database::Database::~Database |
( |
| ) |
|
|
inlinevirtual |
| void trippingcyril::database::Database::disableAutoCommit |
( |
| ) |
|
|
inline |
| void trippingcyril::database::Database::enableAutoCommit |
( |
| ) |
|
|
inline |
| virtual const DBResult* trippingcyril::database::Database::Insert |
( |
const String & |
query, |
|
|
DBCallback * |
callback = NULL |
|
) |
| |
|
pure virtual |
Do a select operation but use a lamdba as a callback instead of a DBCallback class.
- Parameters
-
| query | The query to execute |
| callback | The sucess callback |
| errorcallback | The errorcallback |
- Note
- Requires C++11
-
In case you're implementing the database class you are not required to do anything special, however if you want you may do so anyway.
Reimplemented in trippingcyril::database::postgres::PostGres.
| virtual bool trippingcyril::database::Database::isIdle |
( |
| ) |
const |
|
pure virtual |
| virtual const DBResult* trippingcyril::database::Database::Select |
( |
const String & |
query, |
|
|
DBCallback * |
callback = NULL |
|
) |
| |
|
pure virtual |
Do a select operation but use a lamdba as a callback instead of a DBCallback class.
- Parameters
-
| query | The query to execute |
| callback | The sucess callback |
| errorcallback | The errorcallback |
- Note
- Requires C++11
-
In case you're implementing the database class you are not required to do anything special, however if you want you may do so anyway.
Reimplemented in trippingcyril::database::postgres::PostGres.
| virtual void trippingcyril::database::Database::SetStayConnected |
( |
bool |
b | ) |
|
|
inlinevirtual |
| bool trippingcyril::database::Database::_autocommit |
|
protected |
Marks if we should use autocommit or not
| bool trippingcyril::database::Database::_stay_connected |
|
protected |
Marks if we should stay connected or not
The documentation for this class was generated from the following file: