Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

PostgresDatabaseLayer Class Reference

#include <PostgresDatabaseLayer.h>

Inheritance diagram for PostgresDatabaseLayer:

DatabaseLayer DatabaseErrorReporter DatabaseStringConverter List of all members.

Public Member Functions

 PostgresDatabaseLayer ()
 PostgresDatabaseLayer (const wxString &strDatabase)
 PostgresDatabaseLayer (const wxString &strServer, const wxString &strDatabase)
 PostgresDatabaseLayer (const wxString &strDatabase, const wxString &strUser, const wxString &strPassword)
 PostgresDatabaseLayer (const wxString &strServer, const wxString &strDatabase, const wxString &strUser, const wxString &strPassword)
 PostgresDatabaseLayer (PGconn *pDatabase)
virtual ~PostgresDatabaseLayer ()
virtual bool Open ()
virtual bool Open (const wxString &strDatabase)
virtual bool Open (const wxString &strServer, const wxString &strDatabase)
virtual bool Open (const wxString &strDatabase, const wxString &strUser, const wxString &strPassword)
virtual bool Open (const wxString &strServer, const wxString &strDatabase, const wxString &strUser, const wxString &strPassword)
virtual bool Close ()
 close database
virtual void BeginTransaction ()
 Begin a transaction.
virtual void Commit ()
 Commit the current transaction.
virtual void RollBack ()
 Rollback the current transaction.
virtual bool RunQuery (const wxString &strQuery, bool bParseQuery)
 Run an insert, update, or delete query on the database.
virtual DatabaseResultSetRunQueryWithResults (const wxString &strQuery)
 Run a select query on the database.
virtual PreparedStatementPrepareStatement (const wxString &strQuery)
 Prepare a SQL statement which can be reused with different parameters.

Static Public Member Functions

static int TranslateErrorCode (int nCode)

Constructor & Destructor Documentation

PostgresDatabaseLayer::PostgresDatabaseLayer  ) 
 

Definition at line 15 of file PostgresDatabaseLayer.cpp.

PostgresDatabaseLayer::PostgresDatabaseLayer const wxString &  strDatabase  ) 
 

Definition at line 24 of file PostgresDatabaseLayer.cpp.

References Open().

PostgresDatabaseLayer::PostgresDatabaseLayer const wxString &  strServer,
const wxString &  strDatabase
 

Definition at line 34 of file PostgresDatabaseLayer.cpp.

References Open().

PostgresDatabaseLayer::PostgresDatabaseLayer const wxString &  strDatabase,
const wxString &  strUser,
const wxString &  strPassword
 

Definition at line 44 of file PostgresDatabaseLayer.cpp.

References Open().

PostgresDatabaseLayer::PostgresDatabaseLayer const wxString &  strServer,
const wxString &  strDatabase,
const wxString &  strUser,
const wxString &  strPassword
 

Definition at line 54 of file PostgresDatabaseLayer.cpp.

References Open().

PostgresDatabaseLayer::PostgresDatabaseLayer PGconn *  pDatabase  )  [inline]
 

Definition at line 35 of file PostgresDatabaseLayer.h.

PostgresDatabaseLayer::~PostgresDatabaseLayer  )  [virtual]
 

Definition at line 65 of file PostgresDatabaseLayer.cpp.

References Close().


Member Function Documentation

void PostgresDatabaseLayer::BeginTransaction  )  [virtual]
 

Begin a transaction.

Implements DatabaseLayer.

Definition at line 167 of file PostgresDatabaseLayer.cpp.

References RunQuery().

bool PostgresDatabaseLayer::Close  )  [virtual]
 

close database

Implements DatabaseLayer.

Definition at line 156 of file PostgresDatabaseLayer.cpp.

References DatabaseLayer::CloseResultSets(), and DatabaseLayer::CloseStatements().

Referenced by ~PostgresDatabaseLayer().

void PostgresDatabaseLayer::Commit  )  [virtual]
 

Commit the current transaction.

Implements DatabaseLayer.

Definition at line 172 of file PostgresDatabaseLayer.cpp.

References RunQuery().

bool PostgresDatabaseLayer::Open const wxString &  strServer,
const wxString &  strDatabase,
const wxString &  strUser,
const wxString &  strPassword
[virtual]
 

Definition at line 145 of file PostgresDatabaseLayer.cpp.

References Open().

bool PostgresDatabaseLayer::Open const wxString &  strDatabase,
const wxString &  strUser,
const wxString &  strPassword
[virtual]
 

Definition at line 136 of file PostgresDatabaseLayer.cpp.

References Open().

bool PostgresDatabaseLayer::Open const wxString &  strServer,
const wxString &  strDatabase
[virtual]
 

Definition at line 127 of file PostgresDatabaseLayer.cpp.

References Open().

bool PostgresDatabaseLayer::Open const wxString &  strDatabase  )  [virtual]
 

Implements DatabaseLayer.

Definition at line 121 of file PostgresDatabaseLayer.cpp.

References Open().

bool PostgresDatabaseLayer::Open  )  [virtual]
 

Definition at line 71 of file PostgresDatabaseLayer.cpp.

References DatabaseStringConverter::ConvertFromUnicodeStream(), DatabaseStringConverter::ConvertToUnicodeStream(), DatabaseErrorReporter::ResetErrorCodes(), DatabaseStringConverter::SetEncoding(), DatabaseErrorReporter::SetErrorCode(), DatabaseErrorReporter::SetErrorMessage(), DatabaseErrorReporter::ThrowDatabaseException(), and TranslateErrorCode().

Referenced by Open(), and PostgresDatabaseLayer().

PreparedStatement * PostgresDatabaseLayer::PrepareStatement const wxString &  strQuery  )  [virtual]
 

Prepare a SQL statement which can be reused with different parameters.

Implements DatabaseLayer.

Definition at line 231 of file PostgresDatabaseLayer.cpp.

References PostgresPreparedStatement::CreateStatement(), DatabaseLayer::LogStatementForCleanup(), and DatabaseErrorReporter::ResetErrorCodes().

void PostgresDatabaseLayer::RollBack  )  [virtual]
 

Rollback the current transaction.

Implements DatabaseLayer.

Definition at line 177 of file PostgresDatabaseLayer.cpp.

References RunQuery().

virtual bool PostgresDatabaseLayer::RunQuery const wxString &  strQuery,
bool  bParseQuery
[virtual]
 

Run an insert, update, or delete query on the database.

Implements DatabaseLayer.

Referenced by BeginTransaction(), Commit(), and RollBack().

DatabaseResultSet * PostgresDatabaseLayer::RunQueryWithResults const wxString &  strQuery  )  [virtual]
 

Run a select query on the database.

Implements DatabaseLayer.

Definition at line 207 of file PostgresDatabaseLayer.cpp.

References DatabaseStringConverter::ConvertFromUnicodeStream(), DatabaseStringConverter::ConvertToUnicodeStream(), DatabaseStringConverter::GetEncoding(), DatabaseLayer::LogResultSetForCleanup(), DatabaseErrorReporter::ResetErrorCodes(), DatabaseStringConverter::SetEncoding(), DatabaseErrorReporter::SetErrorCode(), DatabaseErrorReporter::SetErrorMessage(), DatabaseErrorReporter::ThrowDatabaseException(), and TranslateErrorCode().

int PostgresDatabaseLayer::TranslateErrorCode int  nCode  )  [static]
 

Definition at line 240 of file PostgresDatabaseLayer.cpp.

Referenced by Open(), and RunQueryWithResults().


The documentation for this class was generated from the following files:
Generated on Sat May 13 17:31:35 2006 for databaselayer by  doxygen 1.4.1