Version: 1.0.0
wxDatabaseResultSet Class Referenceabstract

#include <resultset.h>

+ Inheritance diagram for wxDatabaseResultSet:

Detailed Description

Definition at line 9 of file resultset.h.

Public Member Functions

 wxDatabaseResultSet ()
 Constructor. More...
 
virtual ~wxDatabaseResultSet ()
 Destructor. More...
 
virtual bool Next ()=0
 Move to the next record in the result set. More...
 
virtual void Close ()=0
 Close the result set (call wxDatabase::CloseResultSet() instead on the result set) More...
 
virtual int LookupField (const wxString &strField)=0
 
virtual int GetResultInt (int nField)=0
 Retrieve an integer from the result set by the 1-based field index. More...
 
virtual wxString GetResultString (int nField)=0
 Retrieve a wxString from the result set by the 1-based field index. More...
 
virtual long GetResultLong (int nField)=0
 Retrieve a long from the result set by the 1-based field index. More...
 
virtual bool GetResultBool (int nField)=0
 Retrieve a boolean from the result set by the 1-based field index. More...
 
virtual wxDateTime GetResultDate (int nField)=0
 Retrieve a wxDateTime from the result set by the 1-based field index. More...
 
virtual void * GetResultBlob (int nField, wxMemoryBuffer &Buffer)=0
 Retrieve a BLOB from the result set by the 1-based field index. More...
 
virtual double GetResultDouble (int nField)=0
 Retrieve a double from the result set by the 1-based field index. More...
 
virtual bool IsFieldNull (int nField)=0
 Check if a field in the current result set record is NULL. 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 wxResultSetMetaDataGetMetaData ()=0
 Retrieve the MetaData associated with this result set. 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)
 

Protected Member Functions

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 ()
 

Private Attributes

wxMetaDataHashSet m_MetaData
 

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)
 

Constructor & Destructor Documentation

◆ wxDatabaseResultSet()

wxDatabaseResultSet::wxDatabaseResultSet ( )

Constructor.

Definition at line 4 of file resultset.cpp.

◆ ~wxDatabaseResultSet()

wxDatabaseResultSet::~wxDatabaseResultSet ( )
virtual

Destructor.

Definition at line 10 of file resultset.cpp.

References CloseMetaData().

Member Function Documentation

◆ Close()

virtual void wxDatabaseResultSet::Close ( )
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

◆ CloseMetaData() [1/2]

bool wxDatabaseResultSet::CloseMetaData ( wxResultSetMetaData pMetaData)
virtual

Close MetaData previously returned by the result set.

Definition at line 109 of file resultset.cpp.

References m_MetaData.

◆ CloseMetaData() [2/2]

void wxDatabaseResultSet::CloseMetaData ( )
protected

Close all meta data objects that have been generated but not yet closed.

Definition at line 96 of file resultset.cpp.

References m_MetaData.

Referenced by ~wxDatabaseResultSet().

◆ GetMetaData()

virtual wxResultSetMetaData* wxDatabaseResultSet::GetMetaData ( )
pure virtual

Retrieve the MetaData associated with this result set.

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

◆ GetResultBlob() [1/2]

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

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by GetResultBlob(), and wxDatabase::GetSingleResultBlob().

◆ GetResultBlob() [2/2]

void * wxDatabaseResultSet::GetResultBlob ( const wxString &  strField,
wxMemoryBuffer &  Buffer 
)
virtual

Retrieve a BLOB from the result set by the result set column name.

Definition at line 66 of file resultset.cpp.

References GetResultBlob(), and LookupField().

◆ GetResultBool() [1/2]

virtual bool wxDatabaseResultSet::GetResultBool ( int  nField)
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by GetResultBool(), and wxDatabase::GetSingleResultBool().

◆ GetResultBool() [2/2]

bool wxDatabaseResultSet::GetResultBool ( const wxString &  strField)
virtual

Retrieve a boolean from the result set by the result set column name.

Definition at line 46 of file resultset.cpp.

References GetResultBool(), and LookupField().

◆ GetResultDate() [1/2]

virtual wxDateTime wxDatabaseResultSet::GetResultDate ( int  nField)
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by GetResultDate(), and wxDatabase::GetSingleResultDate().

◆ GetResultDate() [2/2]

wxDateTime wxDatabaseResultSet::GetResultDate ( const wxString &  strField)
virtual

Retrieve a wxDateTime from the result set by the result set column name.

Definition at line 56 of file resultset.cpp.

References GetResultDate(), and LookupField().

◆ GetResultDouble() [1/2]

virtual double wxDatabaseResultSet::GetResultDouble ( int  nField)
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by GetResultDouble(), and wxDatabase::GetSingleResultDouble().

◆ GetResultDouble() [2/2]

double wxDatabaseResultSet::GetResultDouble ( const wxString &  strField)
virtual

Retrieve a double from the result set by the result set column name.

Definition at line 76 of file resultset.cpp.

References GetResultDouble(), and LookupField().

◆ GetResultInt() [1/2]

virtual int wxDatabaseResultSet::GetResultInt ( int  nField)
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by GetResultInt(), wxDatabase::GetResultsArrayInt(), and wxDatabase::GetSingleResultInt().

◆ GetResultInt() [2/2]

int wxDatabaseResultSet::GetResultInt ( const wxString &  strField)
virtual

Retrieve an integer from the result set by the result set column name.

Definition at line 16 of file resultset.cpp.

References GetResultInt(), and LookupField().

◆ GetResultLong() [1/2]

virtual long wxDatabaseResultSet::GetResultLong ( int  nField)
pure virtual

◆ GetResultLong() [2/2]

long wxDatabaseResultSet::GetResultLong ( const wxString &  strField)
virtual

Retrieve a long from the result set by the result set column name.

Definition at line 36 of file resultset.cpp.

References GetResultLong(), and LookupField().

◆ GetResultString() [1/2]

virtual wxString wxDatabaseResultSet::GetResultString ( int  nField)
pure virtual

◆ GetResultString() [2/2]

wxString wxDatabaseResultSet::GetResultString ( const wxString &  strField)
virtual

Retrieve a wxString from the result set by the result set column name.

Definition at line 26 of file resultset.cpp.

References GetResultString(), and LookupField().

◆ IsFieldNull() [1/2]

virtual bool wxDatabaseResultSet::IsFieldNull ( int  nField)
pure virtual

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

Implemented in wxOdbcResultSet, wxSqliteResultSet, wxMysqlPreparedStatementResultSet, wxTdsResultSet, and wxPostgresResultSet.

Referenced by IsFieldNull().

◆ IsFieldNull() [2/2]

bool wxDatabaseResultSet::IsFieldNull ( const wxString &  strField)
virtual

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

Definition at line 86 of file resultset.cpp.

References IsFieldNull(), and LookupField().

◆ LogMetaDataForCleanup()

void wxDatabaseResultSet::LogMetaDataForCleanup ( wxResultSetMetaData pMetaData)
inlineprotected

Add meta data object pointer to the list for "garbage collection".

Definition at line 70 of file resultset.h.

◆ LookupField()

virtual int wxDatabaseResultSet::LookupField ( const wxString &  strField)
pure virtual

◆ Next()

Member Data Documentation

◆ m_MetaData

wxMetaDataHashSet wxDatabaseResultSet::m_MetaData
private

Definition at line 73 of file resultset.h.

Referenced by CloseMetaData().