Databaseconnectionclasses  0.5.3
hk_mysqldatasource.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_mysqlclasses 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_MYSQLDATASOURCE
12 #define HK_MYSQLDATASOURCE
13 #include <mysql.h>
14 #include "hk_storagedatasource.h"
15 #include "hk_mysqlcolumn.h"
16 #include "hk_column.h"
17 #include <list>
18 #include <vector>
19 #include <algorithm>
20 
21 class hk_mysqldatabase;
22 class hk_mysqlconnection;
23 class hk_presentation;
24 
26 {
27  friend class hk_mysqldatabase;
28 
29  public:
30  hk_mysqlconnection* mysqlconnection(void);
31 
32  MYSQL* dbhandler(void);
33  virtual void set_name(const hk_string& n,bool registerchange=true);
34 
35  protected:
37  virtual ~hk_mysqldatasource();
38 
39  bool driver_specific_enable(void);
40  virtual list<hk_column*>* driver_specific_columns(void);
41  virtual bool driver_specific_create_columns(void);
42  virtual bool driver_specific_insert_data(void);
43  hk_mysqldatabase* p_mysqldatabase;
44  virtual hk_column* driver_specific_new_column(void);
45  virtual bool driver_specific_batch_enable(void);
46  virtual bool driver_specific_batch_disable(void);
47  virtual bool driver_specific_batch_goto_next(void);
48 
49  private:
50  void add_data(unsigned int numfields);
51  void set_handle(void);
52  MYSQL_RES* p_result;
53  MYSQL_ROW p_row;
54  unsigned long *p_length;
55  MYSQL* p_SQL_Connection;
56  void set_uniquenames(list<hk_column*>::iterator);
57 }
58 
59 
60 ;
61 #endif
Definition: hk_mysqldatasource.h:25
virtual void set_name(const hk_string &n, bool registerchange=true)
Definition: hk_mysqldatasource.cpp:486
Definition: hk_storagedatasource.h:22
Definition: hk_mysqldatabase.h:19
Definition: hk_mysqlconnection.h:37
virtual list< hk_column * > * driver_specific_columns(void)
Definition: hk_mysqldatasource.cpp:52
base class for multidatasource based classes like forms and reports
Definition: hk_presentation.h:40
represents one column of a datasource.
Definition: hk_column.h:34
bool driver_specific_enable(void)
Definition: hk_mysqldatasource.cpp:203