hk_mysqltable.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_mysqlclasses library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file COPYING included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 //$Revision: 1.11 $
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

Generated on Tue Nov 28 02:48:08 2006 for Databaseconnectionclasses by  doxygen 1.5.0