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

PostgresPreparedStatement Class Reference

#include <PostgresPreparedStatement.h>

Inheritance diagram for PostgresPreparedStatement:

PreparedStatement DatabaseErrorReporter DatabaseStringConverter List of all members.

Public Member Functions

 PostgresPreparedStatement ()
 PostgresPreparedStatement (PGconn *pDatabase, const wxString &strSQL, const wxString &strStatementName)
virtual ~PostgresPreparedStatement ()
virtual void Close ()
 Close the result set (call DatabaseLayer::ClosePreparedStatement() instead on the statement).
void AddStatement (PGconn *pDatabase, const wxString &strSQL, const wxString &strStatementName)
virtual void SetParamInt (int nPosition, int nValue)
 Set the parameter at the 1-based position to an int value.
virtual void SetParamDouble (int nPosition, double dblValue)
 Set the parameter at the 1-based position to a double value.
virtual void SetParamString (int nPosition, const wxString &strValue)
 Set the parameter at the 1-based position to a wxString value.
virtual void SetParamNull (int nPosition)
 Set the parameter at the 1-based position to a NULL value.
virtual void SetParamBlob (int nPosition, const void *pData, long nDataLength)
 Set the parameter at the 1-based position to a Blob value.
virtual void SetParamDate (int nPosition, const wxDateTime &dateValue)
 Set the parameter at the 1-based position to a wxDateTime value.
virtual void SetParamBool (int nPosition, bool bValue)
 Set the parameter at the 1-based position to a boolean value.
virtual int GetParameterCount ()
virtual void RunQuery ()
 Run an insert, update, or delete query on the database.
virtual DatabaseResultSetRunQueryWithResults ()
 Run an insert, update, or delete query on the database.

Static Public Member Functions

static PostgresPreparedStatementCreateStatement (PGconn *pDatabase, const wxString &strSQL)
static wxString TranslateSQL (const wxString &strOriginalSQL)

Constructor & Destructor Documentation

PostgresPreparedStatement::PostgresPreparedStatement  ) 
 

Definition at line 18 of file PostgresPreparedStatement.cpp.

Referenced by CreateStatement().

PostgresPreparedStatement::PostgresPreparedStatement PGconn *  pDatabase,
const wxString &  strSQL,
const wxString &  strStatementName
 

Definition at line 23 of file PostgresPreparedStatement.cpp.

References AddStatement().

PostgresPreparedStatement::~PostgresPreparedStatement  )  [virtual]
 

Definition at line 30 of file PostgresPreparedStatement.cpp.

References Close().


Member Function Documentation

void PostgresPreparedStatement::AddStatement PGconn *  pDatabase,
const wxString &  strSQL,
const wxString &  strStatementName
 

Definition at line 42 of file PostgresPreparedStatement.cpp.

References DatabaseStringConverter::GetEncoding(), and DatabaseStringConverter::SetEncoding().

Referenced by CreateStatement(), and PostgresPreparedStatement().

void PostgresPreparedStatement::Close  )  [virtual]
 

Close the result set (call DatabaseLayer::ClosePreparedStatement() instead on the statement).

Implements PreparedStatement.

Definition at line 36 of file PostgresPreparedStatement.cpp.

References PreparedStatement::CloseResultSets().

Referenced by ~PostgresPreparedStatement().

PostgresPreparedStatement * PostgresPreparedStatement::CreateStatement PGconn *  pDatabase,
const wxString &  strSQL
[static]
 

Definition at line 49 of file PostgresPreparedStatement.cpp.

References AddStatement(), DatabaseStringConverter::ConvertToUnicodeStream(), ParseQueries(), PostgresPreparedStatement(), DatabaseStringConverter::SetEncoding(), DatabaseErrorReporter::SetErrorCode(), DatabaseErrorReporter::SetErrorMessage(), DatabaseErrorReporter::ThrowDatabaseException(), and TranslateSQL().

Referenced by PostgresDatabaseLayer::PrepareStatement().

int PostgresPreparedStatement::GetParameterCount  )  [virtual]
 

Implements PreparedStatement.

Definition at line 154 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::RunQuery  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 166 of file PostgresPreparedStatement.cpp.

References DATABASE_LAYER_OK, DatabaseErrorReporter::GetErrorCode(), DatabaseErrorReporter::GetErrorMessage(), DatabaseErrorReporter::SetErrorCode(), DatabaseErrorReporter::SetErrorMessage(), and DatabaseErrorReporter::ThrowDatabaseException().

DatabaseResultSet * PostgresPreparedStatement::RunQueryWithResults  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 182 of file PostgresPreparedStatement.cpp.

References DATABASE_LAYER_OK, DatabaseErrorReporter::GetErrorCode(), DatabaseErrorReporter::GetErrorMessage(), PreparedStatement::LogResultSetForCleanup(), PostgresPreparedStatementWrapper::RunQueryWithResults(), DatabaseErrorReporter::SetErrorCode(), DatabaseErrorReporter::SetErrorMessage(), and DatabaseErrorReporter::ThrowDatabaseException().

void PostgresPreparedStatement::SetParamBlob int  nPosition,
const void *  pData,
long  nDataLength
[virtual]
 

Set the parameter at the 1-based position to a Blob value.

Implements PreparedStatement.

Definition at line 127 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamBool int  nPosition,
bool  bValue
[virtual]
 

Set the parameter at the 1-based position to a boolean value.

Implements PreparedStatement.

Definition at line 145 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamDate int  nPosition,
const wxDateTime &  dateValue
[virtual]
 

Set the parameter at the 1-based position to a wxDateTime value.

Implements PreparedStatement.

Definition at line 136 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamDouble int  nPosition,
double  dblValue
[virtual]
 

Set the parameter at the 1-based position to a double value.

Implements PreparedStatement.

Definition at line 100 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamInt int  nPosition,
int  nValue
[virtual]
 

Set the parameter at the 1-based position to an int value.

Implements PreparedStatement.

Definition at line 91 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamNull int  nPosition  )  [virtual]
 

Set the parameter at the 1-based position to a NULL value.

Implements PreparedStatement.

Definition at line 118 of file PostgresPreparedStatement.cpp.

void PostgresPreparedStatement::SetParamString int  nPosition,
const wxString &  strValue
[virtual]
 

Set the parameter at the 1-based position to a wxString value.

Implements PreparedStatement.

Definition at line 109 of file PostgresPreparedStatement.cpp.

wxString PostgresPreparedStatement::TranslateSQL const wxString &  strOriginalSQL  )  [static]
 

Definition at line 244 of file PostgresPreparedStatement.cpp.

Referenced by CreateStatement().


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