00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HK_MYSQLTABLE
00013 #define HK_MYSQLTABLE
00014 #include "hk_datasource.h"
00015 #include "hk_mysqldatasource.h"
00016
00017 class hk_mysqldatabase;
00018 class hk_presentation;
00019 class hk_mysqltable : public hk_mysqldatasource
00020 {
00021 friend class hk_mysqldatabase;
00022 public:
00023 enum_datasourcetypes type() const;
00024
00025 protected:
00026 hk_mysqltable(hk_mysqldatabase* db,hk_presentation* p);
00027 bool driver_specific_enable(void);
00028 bool driver_specific_name(const hk_string& n);
00029 virtual bool driver_specific_create_table_now(void);
00030 virtual bool driver_specific_alter_table_now(void);
00031 virtual list<indexclass>* driver_specific_indices(void);
00032 virtual bool driver_specific_drop_index(const hk_string& i);
00033 virtual bool driver_specific_create_index(const hk_string& name,bool unique,list<hk_string>& fields);
00034
00035 private:
00036 hk_string internal_new_fields_arguments(bool);
00037 hk_string internal_delete_fields_arguments(void);
00038 hk_string internal_alter_fields_arguments(void);
00039 hk_string field2string(hk_column::enum_columntype,const hk_string& m="");
00040 hk_string getprimarystring(bool alter);
00041 hk_string primarystring;
00042 bool is_alteredfield(const hk_string f);
00043 bool is_deletedfield(const hk_string f);
00044 list<indexclass> p_indices;
00045 list<indexclass>::iterator findindex(const hk_string& i);
00046 };
00047 #endif