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