Version: 1.0.0
wxPostgresResultSet Class Reference

#include <postgresql_resultset.h>

+ Inheritance diagram for wxPostgresResultSet:

Detailed Description

Definition at line 6 of file postgresql_resultset.h.

Public Member Functions

 wxPostgresResultSet (wxDynamicPostgresInterface *pInterface)
 
 wxPostgresResultSet (wxDynamicPostgresInterface *pInterface, PGresult *pResult)
 
virtual ~wxPostgresResultSet ()
 
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 LookupField (const wxString &strField)
 
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 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 Attributes

wxDynamicPostgresInterfacem_pInterface
 
PGresult * m_pResult
 
StringToIntMap m_FieldLookupMap
 
int m_nCurrentRow
 
int m_nTotalRows
 
bool m_bBinaryResults
 

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

◆ wxPostgresResultSet() [1/2]

wxPostgresResultSet::wxPostgresResultSet ( wxDynamicPostgresInterface pInterface)

◆ wxPostgresResultSet() [2/2]

wxPostgresResultSet::wxPostgresResultSet ( wxDynamicPostgresInterface pInterface,
PGresult *  pResult 
)

◆ ~wxPostgresResultSet()

virtual wxPostgresResultSet::~wxPostgresResultSet ( )
virtual

Member Function Documentation

◆ Close()

virtual void wxPostgresResultSet::Close ( )
virtual

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

Implements wxDatabaseResultSet.

◆ GetMetaData()

virtual wxResultSetMetaData* wxPostgresResultSet::GetMetaData ( )
virtual

Retrieve the MetaData associated with this result set.

Implements wxDatabaseResultSet.

◆ GetResultBlob()

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

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

Implements wxDatabaseResultSet.

◆ GetResultBool()

virtual bool wxPostgresResultSet::GetResultBool ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ GetResultDate()

virtual wxDateTime wxPostgresResultSet::GetResultDate ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ GetResultDouble()

virtual double wxPostgresResultSet::GetResultDouble ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ GetResultInt()

virtual int wxPostgresResultSet::GetResultInt ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ GetResultLong()

virtual long wxPostgresResultSet::GetResultLong ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ GetResultString()

virtual wxString wxPostgresResultSet::GetResultString ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ IsFieldNull()

virtual bool wxPostgresResultSet::IsFieldNull ( int  nField)
virtual

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

Implements wxDatabaseResultSet.

◆ LookupField()

virtual int wxPostgresResultSet::LookupField ( const wxString &  strField)
virtual

Implements wxDatabaseResultSet.

◆ Next()

virtual bool wxPostgresResultSet::Next ( )
virtual

Move to the next record in the result set.

Implements wxDatabaseResultSet.

Member Data Documentation

◆ m_bBinaryResults

bool wxPostgresResultSet::m_bBinaryResults
private

Definition at line 41 of file postgresql_resultset.h.

◆ m_FieldLookupMap

StringToIntMap wxPostgresResultSet::m_FieldLookupMap
private

Definition at line 38 of file postgresql_resultset.h.

◆ m_nCurrentRow

int wxPostgresResultSet::m_nCurrentRow
private

Definition at line 39 of file postgresql_resultset.h.

◆ m_nTotalRows

int wxPostgresResultSet::m_nTotalRows
private

Definition at line 40 of file postgresql_resultset.h.

◆ m_pInterface

wxDynamicPostgresInterface* wxPostgresResultSet::m_pInterface
private

Definition at line 35 of file postgresql_resultset.h.

◆ m_pResult

PGresult* wxPostgresResultSet::m_pResult
private

Definition at line 36 of file postgresql_resultset.h.