PostgreSQL database class with simplified access to libpq++. More...
#include <LoxPQDB.hpp>
Public Member Functions | |
PQDB (const std::string &connectionString) | |
Construtor. More... | |
PQDB (const std::string &user, const std::string &password, const std::string &hostaddr, const std::string &application_name, const std::string &dbname) | |
Constructor. More... | |
virtual | ~PQDB (void) |
Destructor. More... | |
virtual DBResult | exec (const std::string &sql) |
Run a simple query that doesn't need a transaction. More... | |
virtual DBResult | exec1 (const std::string &sql) |
Similar to exec(), but ensures there is exactly 1 result. Will throw if there isn't exactly a single row. More... | |
PostgreSQL database class with simplified access to libpq++.
Provide easy-to-use database access to PostgreSQL via libpqxx. The PQDB objects represent not the database, but a single connection to an existing database. Multiple PQDB objects can be instantiated, and each one will create a unique connection to the back-end database.
Lox::PQDB::PQDB | ( | const std::string & | connectionString | ) |
Construtor.
Lox::PQDB::PQDB | ( | const std::string & | user, |
const std::string & | password, | ||
const std::string & | hostaddr, | ||
const std::string & | application_name, | ||
const std::string & | dbname | ||
) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Run a simple query that doesn't need a transaction.
References LOX_CATCH_DISPLAY_AND_RETRHOW.
|
virtual |