Databaseconnectionclasses  0.5.3
hk_storagedatasource.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_storageclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file COPYING included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 #ifndef HK_STORAGEDATASOURCE
12 #define HK_STORAGEDATASOURCE
13 #include "hk_datasource.h"
14 #include "hk_column.h"
15 #include <list>
16 #include <vector>
17 #include <algorithm>
18 using namespace std;
19 
20 class hk_presentation;
21 
23 {
24  public:
25 // vector <struct_raw_data*>* data();
26  struct_raw_data* columndata(unsigned long row, unsigned int fieldnr);
27  enum_datasourcetypes type();
28  virtual void dump_data(void);
29 
30  protected:
35  void delete_data(void);
43  bool insert_data(struct_raw_data* datarow);
47  void memory_error(void);
49 
50  virtual ~hk_storagedatasource();
51 
52  bool driver_specific_enable(void);
53  bool driver_specific_disable(void);
54  virtual list<hk_column*>* driver_specific_columns(void);
55  virtual bool driver_specific_goto_row(unsigned long r);
56  virtual unsigned long driver_specific_max_rows(void);
57  virtual bool driver_specific_create_columns(void);
58  virtual bool driver_specific_update_data(void);
59  virtual bool driver_specific_insert_data(void);
60  virtual bool driver_specific_delete_data_at(unsigned long);
61  virtual bool driver_specific_batch_goto_previous(void);
62  virtual bool driver_specific_batch_goto_next(void);
63 
64  bool p_data_changed;
65  long p_debug_counter;
66  struct_raw_data p_d;
67  void set_maxrows(unsigned long);
68  bool is_batchprevious(void){return use_batch_previous;}
69 
70  private:
71  vector<struct_raw_data*> p_data;
72  unsigned long p_rows;
73  bool use_batch_previous;
74 }
75 
76 
77 ;
78 #endif
represents a particular database on the SQL Server
Definition: hk_database.h:48
Definition: hk_storagedatasource.h:22
Definition: hk_definitions.h:122
represents a resultquery or a table of a database.
Definition: hk_datasource.h:45
base class for multidatasource based classes like forms and reports
Definition: hk_presentation.h:40
enum_datasourcetypes
Definition: hk_data.h:41