Databaseconnectionclasses  0.5.3
hk_mysqltable.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 //$Revision: 1.11 $
12 #ifndef HK_MYSQLTABLE
13 #define HK_MYSQLTABLE
14 #include "hk_datasource.h"
15 #include "hk_mysqldatasource.h"
16 
17 class hk_mysqldatabase;
18 class hk_presentation;
20 {
21  friend class hk_mysqldatabase;
22  public:
23  enum_datasourcetypes type() const;
24 
25  protected:
27  bool driver_specific_enable(void);
28  bool driver_specific_name(const hk_string& n);
29  virtual bool driver_specific_create_table_now(void);
30  virtual bool driver_specific_alter_table_now(void);
31  virtual list<indexclass>* driver_specific_indices(void);
32  virtual bool driver_specific_drop_index(const hk_string& i);
33  virtual bool driver_specific_create_index(const hk_string& name,bool unique,list<hk_string>& fields);
34 
35  private:
36  hk_string internal_new_fields_arguments(bool);
37  hk_string internal_delete_fields_arguments(void);
38  hk_string internal_alter_fields_arguments(void);
39  hk_string field2string(hk_column::enum_columntype,const hk_string& m="");
40  hk_string getprimarystring(bool alter);
41  hk_string primarystring;
42  bool is_alteredfield(const hk_string f);
43  bool is_deletedfield(const hk_string f);
44  list<indexclass> p_indices;
45  list<indexclass>::iterator findindex(const hk_string& i);
46 };
47 #endif
Definition: hk_mysqldatasource.h:25
enum_columntype
Definition: hk_column.h:93
Definition: hk_mysqldatabase.h:19
bool driver_specific_enable(void)
Definition: hk_mysqltable.cpp:37
base class for multidatasource based classes like forms and reports
Definition: hk_presentation.h:40
enum_datasourcetypes
Definition: hk_data.h:41
Definition: hk_mysqltable.h:19