Version: 1.0.0
postgresql_resultset.h
Go to the documentation of this file.
1 #ifndef _WX_DATABASE_POSTGRESQL_RESULT_SET_H_
2 #define _WX_DATABASE_POSTGRESQL_RESULT_SET_H_
3 
4 #include "wx/database/wxprec.h"
5 
7 {
8 public:
9  // ctor
11  wxPostgresResultSet(wxDynamicPostgresInterface* pInterface, PGresult* pResult);
12 
13  // dtor
14  virtual ~wxPostgresResultSet();
15 
16  virtual bool Next();
17  virtual void Close();
18 
19  virtual int LookupField(const wxString& strField);
20 
21  // get field
22  virtual int GetResultInt(int nField);
23  virtual wxString GetResultString(int nField);
24  virtual long GetResultLong(int nField);
25  virtual bool GetResultBool(int nField);
26  virtual wxDateTime GetResultDate(int nField);
27  virtual void* GetResultBlob(int nField, wxMemoryBuffer& Buffer);
28  virtual double GetResultDouble(int nField);
29  virtual bool IsFieldNull(int nField);
30 
31  // get MetaData
33 
34 private:
36  PGresult* m_pResult;
37 
38  StringToIntMap m_FieldLookupMap;
42 };
43 
44 #endif//_WX_DATABASE_POSTGRESQL_RESULT_SET_H_
45 
virtual bool GetResultBool(int nField)
Retrieve a boolean from the result set by the 1-based field index.
virtual long GetResultLong(int nField)
Retrieve a long from the result set by the 1-based field index.
virtual int LookupField(const wxString &strField)
wxDynamicPostgresInterface * m_pInterface
virtual wxString GetResultString(int nField)
Retrieve a wxString from the result set by the 1-based field index.
virtual wxResultSetMetaData * GetMetaData()
Retrieve the MetaData associated with this result set.
wxPostgresResultSet(wxDynamicPostgresInterface *pInterface)
virtual wxDateTime GetResultDate(int nField)
Retrieve a wxDateTime from the result set by the 1-based field index.
virtual ~wxPostgresResultSet()
virtual void * GetResultBlob(int nField, wxMemoryBuffer &Buffer)
Retrieve a BLOB from the result set by the 1-based field index.
virtual void Close()
Close the result set (call wxDatabase::CloseResultSet() instead on the result set)
virtual bool Next()
Move to the next record in the result set.
virtual int GetResultInt(int nField)
Retrieve an integer from the result set by the 1-based field index.
StringToIntMap m_FieldLookupMap
virtual bool IsFieldNull(int nField)
Check if a field in the current result set record is NULL.
virtual double GetResultDouble(int nField)
Retrieve a double from the result set by the 1-based field index.