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

SqlitePreparedStatement Class Reference

#include <SqlitePreparedStatement.h>

Inheritance diagram for SqlitePreparedStatement:

PreparedStatement DatabaseErrorReporter DatabaseStringConverter List of all members.

Public Member Functions

 SqlitePreparedStatement (sqlite3 *pDatabase)
 SqlitePreparedStatement (sqlite3 *pDatabase, sqlite3_stmt *pStatement)
 SqlitePreparedStatement (sqlite3 *pDatabase, StatementVector statements)
virtual ~SqlitePreparedStatement ()
virtual void Close ()
 Close the result set (call DatabaseLayer::ClosePreparedStatement() instead on the statement).
void AddPreparedStatement (sqlite3_stmt *pStatement)
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.
sqlite3_stmt * GetLastStatement ()

Constructor & Destructor Documentation

SqlitePreparedStatement::SqlitePreparedStatement sqlite3 *  pDatabase  ) 
 

Definition at line 6 of file SqlitePreparedStatement.cpp.

SqlitePreparedStatement::SqlitePreparedStatement sqlite3 *  pDatabase,
sqlite3_stmt *  pStatement
 

Definition at line 12 of file SqlitePreparedStatement.cpp.

SqlitePreparedStatement::SqlitePreparedStatement sqlite3 *  pDatabase,
StatementVector  statements
 

Definition at line 19 of file SqlitePreparedStatement.cpp.

SqlitePreparedStatement::~SqlitePreparedStatement  )  [virtual]
 

Definition at line 27 of file SqlitePreparedStatement.cpp.

References Close().


Member Function Documentation

void SqlitePreparedStatement::AddPreparedStatement sqlite3_stmt *  pStatement  ) 
 

Definition at line 56 of file SqlitePreparedStatement.cpp.

Referenced by SqliteDatabaseLayer::PrepareStatement().

void SqlitePreparedStatement::Close  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 32 of file SqlitePreparedStatement.cpp.

References PreparedStatement::CloseResultSets().

Referenced by SqliteResultSet::Close(), and ~SqlitePreparedStatement().

sqlite3_stmt* SqlitePreparedStatement::GetLastStatement  )  [inline]
 

Definition at line 53 of file SqlitePreparedStatement.h.

Referenced by SqliteResultSet::GetResultBlob(), SqliteResultSet::GetResultBool(), SqliteResultSet::GetResultDouble(), SqliteResultSet::GetResultInt(), SqliteResultSet::GetResultLong(), SqliteResultSet::GetResultString(), SqliteResultSet::IsFieldNull(), SqliteResultSet::Next(), and SqliteResultSet::SqliteResultSet().

int SqlitePreparedStatement::GetParameterCount  )  [virtual]
 

Implements PreparedStatement.

Definition at line 208 of file SqlitePreparedStatement.cpp.

References DatabaseErrorReporter::ResetErrorCodes().

void SqlitePreparedStatement::RunQuery  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 223 of file SqlitePreparedStatement.cpp.

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

DatabaseResultSet * SqlitePreparedStatement::RunQueryWithResults  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 247 of file SqlitePreparedStatement.cpp.

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

void SqlitePreparedStatement::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 135 of file SqlitePreparedStatement.cpp.

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

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

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

Implements PreparedStatement.

Definition at line 190 of file SqlitePreparedStatement.cpp.

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

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

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

Implements PreparedStatement.

Definition at line 153 of file SqlitePreparedStatement.cpp.

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

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

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

Implements PreparedStatement.

Definition at line 80 of file SqlitePreparedStatement.cpp.

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

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

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

Implements PreparedStatement.

Definition at line 62 of file SqlitePreparedStatement.cpp.

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

void SqlitePreparedStatement::SetParamNull int  nPosition  )  [virtual]
 

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

Implements PreparedStatement.

Definition at line 117 of file SqlitePreparedStatement.cpp.

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

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

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

Implements PreparedStatement.

Definition at line 98 of file SqlitePreparedStatement.cpp.

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


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