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

PreparedStatement Class Reference

#include <PreparedStatement.h>

Inheritance diagram for PreparedStatement:

DatabaseErrorReporter DatabaseStringConverter FirebirdPreparedStatement MysqlPreparedStatement OdbcPreparedStatement OraclePreparedStatement PostgresPreparedStatement SqlitePreparedStatement List of all members.

Public Member Functions

 PreparedStatement ()
 Constructor.
virtual ~PreparedStatement ()
 Destructor.
virtual void Close ()=0
 Close the result set (call DatabaseLayer::ClosePreparedStatement() instead on the statement).
virtual void SetParamInt (int nPosition, int nValue)=0
 Set the parameter at the 1-based position to an int value.
virtual void SetParamDouble (int nPosition, double dblValue)=0
 Set the parameter at the 1-based position to a double value.
virtual void SetParamString (int nPosition, const wxString &strValue)=0
 Set the parameter at the 1-based position to a wxString value.
virtual void SetParamNull (int nPosition)=0
 Set the parameter at the 1-based position to a NULL value.
virtual void SetParamBlob (int nPosition, const void *pData, long nDataLength)=0
 Set the parameter at the 1-based position to a Blob value.
virtual void SetParamDate (int nPosition, const wxDateTime &dateValue)=0
 Set the parameter at the 1-based position to a wxDateTime value.
virtual void SetParamBool (int nPosition, bool bValue)=0
 Set the parameter at the 1-based position to a boolean value.
virtual int GetParameterCount ()=0
virtual void RunQuery ()=0
 Run an insert, update, or delete query on the database.
virtual DatabaseResultSetRunQueryWithResults ()=0
 Run an insert, update, or delete query on the database.
void ExecuteUpdate ()
 See RunQuery.
DatabaseResultSetExecuteQuery ()
 See RunQueryWithResults.
virtual bool CloseResultSet (DatabaseResultSet *pResultSet)
 Close a result set returned by the database or a prepared statement previously.

Protected Member Functions

void CloseResultSets ()
 Close all result set objects that have been generated but not yet closed.
void LogResultSetForCleanup (DatabaseResultSet *pResultSet)
 Add result set object pointer to the list for "garbage collection".

Constructor & Destructor Documentation

PreparedStatement::PreparedStatement  ) 
 

Constructor.

Definition at line 4 of file PreparedStatement.cpp.

PreparedStatement::~PreparedStatement  )  [virtual]
 

Destructor.

Definition at line 10 of file PreparedStatement.cpp.

References CloseResultSets().


Member Function Documentation

virtual void PreparedStatement::Close  )  [pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

bool PreparedStatement::CloseResultSet DatabaseResultSet pResultSet  )  [virtual]
 

Close a result set returned by the database or a prepared statement previously.

Definition at line 30 of file PreparedStatement.cpp.

Referenced by DatabaseLayer::CloseResultSet().

void PreparedStatement::CloseResultSets  )  [protected]
 

Close all result set objects that have been generated but not yet closed.

Definition at line 16 of file PreparedStatement.cpp.

Referenced by SqlitePreparedStatement::Close(), PostgresPreparedStatement::Close(), OdbcPreparedStatement::Close(), MysqlPreparedStatement::Close(), FirebirdPreparedStatement::Close(), and ~PreparedStatement().

DatabaseResultSet* PreparedStatement::ExecuteQuery  )  [inline]
 

See RunQueryWithResults.

Definition at line 63 of file PreparedStatement.h.

References RunQueryWithResults().

void PreparedStatement::ExecuteUpdate  )  [inline]
 

See RunQuery.

Definition at line 61 of file PreparedStatement.h.

References RunQuery().

virtual int PreparedStatement::GetParameterCount  )  [pure virtual]
 

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

void PreparedStatement::LogResultSetForCleanup DatabaseResultSet pResultSet  )  [inline, protected]
 

Add result set object pointer to the list for "garbage collection".

Definition at line 72 of file PreparedStatement.h.

Referenced by SqlitePreparedStatement::RunQueryWithResults(), PostgresPreparedStatement::RunQueryWithResults(), OdbcPreparedStatement::RunQueryWithResults(), MysqlPreparedStatement::RunQueryWithResults(), and FirebirdPreparedStatement::RunQueryWithResults().

virtual void PreparedStatement::RunQuery  )  [pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

Referenced by ExecuteUpdate().

virtual DatabaseResultSet* PreparedStatement::RunQueryWithResults  )  [pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

Referenced by ExecuteQuery().

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

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

virtual void PreparedStatement::SetParamBool int  nPosition,
bool  bValue
[pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

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

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

virtual void PreparedStatement::SetParamDouble int  nPosition,
double  dblValue
[pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

virtual void PreparedStatement::SetParamInt int  nPosition,
int  nValue
[pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

virtual void PreparedStatement::SetParamNull int  nPosition  )  [pure virtual]
 

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.

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

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

Implemented in FirebirdPreparedStatement, MysqlPreparedStatement, OdbcPreparedStatement, OraclePreparedStatement, PostgresPreparedStatement, and SqlitePreparedStatement.


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