ToolMap
Loading...
Searching...
No Matches
databaseresult.h
1/***************************************************************************
2 databaseresult.h
3 -------------------
4 copyright : (C) 2010 CREALP Lucien Schreiber
5 ***************************************************************************/
6
7/***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef _DATABASERESULT_H
17#define _DATABASERESULT_H
18
19// For compilers that support precompilation, includes "wx/wx.h".
20#include <wx/wxprec.h>
21// Include wxWidgets' headers
22#ifndef WX_PRECOMP
23#include <wx/wx.h>
24#endif
25
26#include "database.h"
27#include "mysql.h"
28#include "ogrsf_frmts.h" // OGR accessing
29
31 private:
32 MYSQL_RES** m_ResultSet;
33 MYSQL_ROW m_Row;
34 long m_RowIndex;
35 tmArrayULong m_RowLengths;
36
37 protected:
38 bool _GetRowLength();
39
40 public:
42
43 DataBaseResult(MYSQL_RES** results);
44
45 void Create(MYSQL_RES** results);
46
48
49 bool HasResults();
50
51 int GetColCount();
52
53 long GetRowCount();
54
55 bool GetColName(wxArrayString& fields);
56
57 bool GetValue(int col, wxString& value);
58
59 bool GetValue(int col, long& value);
60
61 bool GetValue(int col, OGRGeometry** geometry);
62
63 bool NextRow();
64
65 bool IsRowOk();
66
67 bool GotoRow(long row);
68};
69
70#endif
Definition databaseresult.h:30
Definition of class DataBase.