DatabasePostgreSQL Class Reference

Inheritance diagram for DatabasePostgreSQL:

Inheritance graph
Collaboration diagram for DatabasePostgreSQL:

Collaboration graph

List of all members.

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

Constructor & Destructor Documentation

DatabasePostgreSQL::DatabasePostgreSQL (  )  [inline]

DatabasePostgreSQL::~DatabasePostgreSQL (  )  [inline]

Member Function Documentation

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]


  • Returns the first automatically generated AUTO_INCREMENT value (or the AUTO_INCREMENT value of the previously inserted row or 0 if there isn't one).
  • Throws an exception if VARCHARs are too long. PostgreSQL:
  • Returns the inserted OID (or 0 if no the table has no OIDs).
  • Truncates VARCHARs that are too long.

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.

The documentation for this class was generated from the following file:

Generated on Mon Mar 16 20:04:32 2009 for by  doxygen 1.5.5