Public Member Functions | |
DatabaseSQLite () | |
~DatabaseSQLite () | |
void | connect (const std::string &server, const std::string &username, const std::string &password, const std::string &dbname) |
void | execute (const std::string &statement) |
dbfacade::ResultPtr | sqlSelect (const std::string &statement, const bool allAtOnce=true) |
int | sqlInsert (const std::string &statement) |
int | sqlUpdate (const std::string &statement) |
std::string | escape (const char *unescaped, const int size) const |
DatabaseSQLite::DatabaseSQLite | ( | ) | [inline] |
DatabaseSQLite::~DatabaseSQLite | ( | ) | [inline] |
void DatabaseSQLite::connect | ( | const std::string & | server, | |
const std::string & | username, | |||
const std::string & | password, | |||
const std::string & | dbname | |||
) | [inline, virtual] |
Establishes a connection to a database.
Implements dbfacade::Database.
void DatabaseSQLite::execute | ( | const std::string & | statement | ) | [inline, virtual] |
Called by sqlSelect, sqlInsert and sqlUpdate.
Implements dbfacade::Database.
dbfacade::ResultPtr DatabaseSQLite::sqlSelect | ( | const std::string & | statement, | |
const bool | allAtOnce = true | |||
) | [inline, virtual] |
Returns the result of the select statement.
Implements dbfacade::Database.
int DatabaseSQLite::sqlInsert | ( | const std::string & | statement | ) | [inline, virtual] |
MySQL:
Implements dbfacade::Database.
int DatabaseSQLite::sqlUpdate | ( | const std::string & | statement | ) | [inline, virtual] |
Returns the number of affected rows.
Implements dbfacade::Database.
std::string DatabaseSQLite::escape | ( | const char * | unescaped, | |
const int | size | |||
) | const [inline, virtual] |
Replaces characters by escape sequences.
Implements dbfacade::Database.