Version: 1.0.0
wxOdbcResultSet Class Reference

#include <odbc_resultset.h>

+ Inheritance diagram for wxOdbcResultSet:

Detailed Description

Definition at line 13 of file odbc_resultset.h.

Public Member Functions

 wxOdbcResultSet (wxOdbcInterface *pInterface)
 
 wxOdbcResultSet (wxOdbcInterface *pInterface, wxOdbcPreparedStatement *pStatement, bool bManageStatement=false, int nCol=0)
 
virtual ~wxOdbcResultSet ()
 
virtual bool Next ()
 Move to the next record in the result set. More...
 
virtual void Close ()
 Close the result set (call wxDatabase::CloseResultSet() instead on the result set) More...
 
virtual int GetResultInt (int nField)
 Retrieve an integer from the result set by the 1-based field index. More...
 
virtual wxString GetResultString (int nField)
 Retrieve a wxString from the result set by the 1-based field index. More...
 
virtual long GetResultLong (int nField)
 Retrieve a long from the result set by the 1-based field index. More...
 
virtual bool GetResultBool (int nField)
 Retrieve a boolean from the result set by the 1-based field index. More...
 
virtual wxDateTime GetResultDate (int nField)
 Retrieve a wxDateTime from the result set by the 1-based field index. More...
 
virtual void * GetResultBlob (int nField, wxMemoryBuffer &Buffer)
 Retrieve a BLOB from the result set by the 1-based field index. More...
 
virtual double GetResultDouble (int nField)
 Retrieve a double from the result set by the 1-based field index. More...
 
virtual bool IsFieldNull (int nField)
 Check if a field in the current result set record is NULL. More...
 
virtual int GetFieldLength (int nField)
 
virtual int GetFieldLength (const wxString &strField)
 
virtual wxResultSetMetaDataGetMetaData ()
 Retrieve the MetaData associated with this result set. More...
 
- Public Member Functions inherited from wxDatabaseResultSet
 wxDatabaseResultSet ()
 Constructor. More...
 
virtual ~wxDatabaseResultSet ()
 Destructor. More...
 
virtual int GetResultInt (const wxString &strField)
 Retrieve an integer from the result set by the result set column name. More...
 
virtual wxString GetResultString (const wxString &strField)
 Retrieve a wxString from the result set by the result set column name. More...
 
virtual long GetResultLong (const wxString &strField)
 Retrieve a long from the result set by the result set column name. More...
 
virtual bool GetResultBool (const wxString &strField)
 Retrieve a boolean from the result set by the result set column name. More...
 
virtual wxDateTime GetResultDate (const wxString &strField)
 Retrieve a wxDateTime from the result set by the result set column name. More...
 
virtual void * GetResultBlob (const wxString &strField, wxMemoryBuffer &Buffer)
 Retrieve a BLOB from the result set by the result set column name. More...
 
virtual double GetResultDouble (const wxString &strField)
 Retrieve a double from the result set by the result set column name. More...
 
virtual bool IsFieldNull (const wxString &strField)
 Check if a field in the current result set record is NULL. More...
 
virtual bool CloseMetaData (wxResultSetMetaData *pMetaData)
 Close MetaData previously returned by the result set. More...
 
- Public Member Functions inherited from wxDatabaseErrorReporter
 wxDatabaseErrorReporter ()
 
virtual ~wxDatabaseErrorReporter ()
 
const wxString & GetErrorMessage ()
 
int GetErrorCode ()
 
void ResetErrorCodes ()
 
- Public Member Functions inherited from wxDatabaseStringConverter
 wxDatabaseStringConverter ()
 
 wxDatabaseStringConverter (const wxChar *charset)
 
virtual ~wxDatabaseStringConverter ()
 
void SetEncoding (wxFontEncoding encoding)
 
void SetEncoding (const wxCSConv *conv)
 
const wxCSConv * GetEncoding ()
 
virtual const wxCharBuffer ConvertToUnicodeStream (const wxString &inputString)
 
virtual size_t GetEncodedStreamLength (const wxString &inputString)
 
virtual wxString ConvertFromUnicodeStream (const char *inputBuffer)
 
virtual wxString ConvertFromUnicodeStream (const wxChar *inputBuffer)
 

Private Member Functions

void RetrieveFieldData (int nField)
 
void InterpretErrorCodes (long nCode, SQLHSTMT stmth_ptr=NULL)
 
virtual int LookupField (const wxString &strField)
 
bool IsBlob (int nField)
 

Private Attributes

wxOdbcPreparedStatementm_pStatement
 
SQLHSTMT m_pOdbcStatement
 
StringToIntMap m_FieldLookupMap
 
ValuesArray m_fieldValues
 
IntegerSet m_RetrievedValues
 
IntegerSet m_NullValues
 
bool m_bManageStatement
 
SQLHSTMT m_pHStmt
 
wxOdbcInterfacem_pInterface
 
BlobMap m_BlobMap
 

Additional Inherited Members

- Static Public Member Functions inherited from wxDatabaseStringConverter
static const wxCharBuffer ConvertToUnicodeStream (const wxString &inputString, const char *encoding)
 
static wxString ConvertFromUnicodeStream (const char *inputBuffer, const char *encoding)
 
static size_t GetEncodedStreamLength (const wxString &inputString, const char *encoding)
 
static wxString ConvertFromUnicodeStream (const wxChar *inputBuffer, const char *encoding)
 
- Protected Member Functions inherited from wxDatabaseResultSet
void CloseMetaData ()
 Close all meta data objects that have been generated but not yet closed. More...
 
void LogMetaDataForCleanup (wxResultSetMetaData *pMetaData)
 Add meta data object pointer to the list for "garbage collection". More...
 
- Protected Member Functions inherited from wxDatabaseErrorReporter
void SetErrorMessage (const wxString &strErrorMessage)
 
void SetErrorCode (int nErrorCode)
 
void ThrowDatabaseException ()
 

Constructor & Destructor Documentation

◆ wxOdbcResultSet() [1/2]

wxOdbcResultSet::wxOdbcResultSet ( wxOdbcInterface pInterface)

◆ wxOdbcResultSet() [2/2]

wxOdbcResultSet::wxOdbcResultSet ( wxOdbcInterface pInterface,
wxOdbcPreparedStatement pStatement,
bool  bManageStatement = false,
int  nCol = 0 
)

◆ ~wxOdbcResultSet()

virtual wxOdbcResultSet::~wxOdbcResultSet ( )
virtual

Member Function Documentation

◆ Close()

virtual void wxOdbcResultSet::Close ( )
virtual

Close the result set (call wxDatabase::CloseResultSet() instead on the result set)

Implements wxDatabaseResultSet.

◆ GetFieldLength() [1/2]

virtual int wxOdbcResultSet::GetFieldLength ( int  nField)
virtual

◆ GetFieldLength() [2/2]

virtual int wxOdbcResultSet::GetFieldLength ( const wxString &  strField)
virtual

◆ GetMetaData()

virtual wxResultSetMetaData* wxOdbcResultSet::GetMetaData ( )
virtual

Retrieve the MetaData associated with this result set.

Implements wxDatabaseResultSet.

◆ GetResultBlob()

virtual void* wxOdbcResultSet::GetResultBlob ( int  nField,
wxMemoryBuffer &  Buffer 
)
virtual

Retrieve a BLOB from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultBool()

virtual bool wxOdbcResultSet::GetResultBool ( int  nField)
virtual

Retrieve a boolean from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultDate()

virtual wxDateTime wxOdbcResultSet::GetResultDate ( int  nField)
virtual

Retrieve a wxDateTime from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultDouble()

virtual double wxOdbcResultSet::GetResultDouble ( int  nField)
virtual

Retrieve a double from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultInt()

virtual int wxOdbcResultSet::GetResultInt ( int  nField)
virtual

Retrieve an integer from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultLong()

virtual long wxOdbcResultSet::GetResultLong ( int  nField)
virtual

Retrieve a long from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ GetResultString()

virtual wxString wxOdbcResultSet::GetResultString ( int  nField)
virtual

Retrieve a wxString from the result set by the 1-based field index.

Implements wxDatabaseResultSet.

◆ InterpretErrorCodes()

void wxOdbcResultSet::InterpretErrorCodes ( long  nCode,
SQLHSTMT  stmth_ptr = NULL 
)
private

◆ IsBlob()

bool wxOdbcResultSet::IsBlob ( int  nField)
private

◆ IsFieldNull()

virtual bool wxOdbcResultSet::IsFieldNull ( int  nField)
virtual

Check if a field in the current result set record is NULL.

Implements wxDatabaseResultSet.

◆ LookupField()

virtual int wxOdbcResultSet::LookupField ( const wxString &  strField)
privatevirtual

Implements wxDatabaseResultSet.

◆ Next()

virtual bool wxOdbcResultSet::Next ( )
virtual

Move to the next record in the result set.

Implements wxDatabaseResultSet.

◆ RetrieveFieldData()

void wxOdbcResultSet::RetrieveFieldData ( int  nField)
private

Member Data Documentation

◆ m_BlobMap

BlobMap wxOdbcResultSet::m_BlobMap
private

Definition at line 62 of file odbc_resultset.h.

◆ m_bManageStatement

bool wxOdbcResultSet::m_bManageStatement
private

Definition at line 58 of file odbc_resultset.h.

◆ m_FieldLookupMap

StringToIntMap wxOdbcResultSet::m_FieldLookupMap
private

Definition at line 51 of file odbc_resultset.h.

◆ m_fieldValues

ValuesArray wxOdbcResultSet::m_fieldValues
private

Definition at line 52 of file odbc_resultset.h.

◆ m_NullValues

IntegerSet wxOdbcResultSet::m_NullValues
private

Definition at line 56 of file odbc_resultset.h.

◆ m_pHStmt

SQLHSTMT wxOdbcResultSet::m_pHStmt
private

Definition at line 59 of file odbc_resultset.h.

◆ m_pInterface

wxOdbcInterface* wxOdbcResultSet::m_pInterface
private

Definition at line 60 of file odbc_resultset.h.

◆ m_pOdbcStatement

SQLHSTMT wxOdbcResultSet::m_pOdbcStatement
private

Definition at line 49 of file odbc_resultset.h.

◆ m_pStatement

wxOdbcPreparedStatement* wxOdbcResultSet::m_pStatement
private

Definition at line 48 of file odbc_resultset.h.

◆ m_RetrievedValues

IntegerSet wxOdbcResultSet::m_RetrievedValues
private

Definition at line 54 of file odbc_resultset.h.