Public Member Functions | |
DatabasePostgreSQL () | |
~DatabasePostgreSQL () | |
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 |
DatabasePostgreSQL::DatabasePostgreSQL | ( | ) | [inline] |
DatabasePostgreSQL::~DatabasePostgreSQL | ( | ) | [inline] |
void DatabasePostgreSQL::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 DatabasePostgreSQL::execute | ( | const std::string & | statement | ) | [inline, virtual] |
Called by sqlSelect, sqlInsert and sqlUpdate.
Implements dbfacade::Database.
dbfacade::ResultPtr DatabasePostgreSQL::sqlSelect | ( | const std::string & | statement, | |
const bool | allAtOnce = true | |||
) | [inline, virtual] |
Returns the result of the select statement.
Implements dbfacade::Database.
int DatabasePostgreSQL::sqlInsert | ( | const std::string & | statement | ) | [inline, virtual] |
MySQL:
Implements dbfacade::Database.
int DatabasePostgreSQL::sqlUpdate | ( | const std::string & | statement | ) | [inline, virtual] |
Returns the number of affected rows.
Implements dbfacade::Database.
std::string DatabasePostgreSQL::escape | ( | const char * | unescaped, | |
const int | size | |||
) | const [inline, virtual] |
Replaces characters by escape sequences.
Implements dbfacade::Database.