hk_mysqldatasource.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 #ifndef HK_MYSQLDATASOURCE
00012 #define HK_MYSQLDATASOURCE
00013 #include <mysql.h>
00014 #include "hk_storagedatasource.h"
00015 #include "hk_mysqlcolumn.h"
00016 #include "hk_column.h"
00017 #include <list>
00018 #include <vector>
00019 #include <algorithm>
00020 
00021 class hk_mysqldatabase;
00022 class hk_mysqlconnection;
00023 class hk_presentation;
00024 
00025 class hk_mysqldatasource:public hk_storagedatasource
00026 {
00027     friend class hk_mysqldatabase;
00028 
00029     public:
00030         hk_mysqlconnection* mysqlconnection(void);
00031 
00032         MYSQL* dbhandler(void);
00033 
00034     protected:
00035         hk_mysqldatasource(hk_mysqldatabase* d,hk_presentation* p);
00036         virtual ~hk_mysqldatasource();
00037 
00038         bool driver_specific_enable(void);
00039         virtual list<hk_column*>* driver_specific_columns(void);
00040         virtual bool driver_specific_create_columns(void);
00041         virtual bool driver_specific_insert_data(void);
00042         hk_mysqldatabase* p_mysqldatabase;
00043         virtual hk_column* driver_specific_new_column(void);
00044         virtual bool driver_specific_batch_enable(void);
00045         virtual bool driver_specific_batch_disable(void);
00046         virtual bool driver_specific_batch_goto_next(void);
00047 
00048     private:
00049         void add_data(unsigned int numfields);
00050         void set_handle(void);
00051         MYSQL_RES* p_result;
00052         MYSQL_ROW p_row;
00053         unsigned long *p_length;
00054         MYSQL* p_SQL_Connection;
00055         void set_uniquenames(list<hk_column*>::iterator);
00056 }
00057 
00058 
00059 ;
00060 #endif

Generated on Tue May 2 09:15:35 2006 for Databaseconnectionclasses by  doxygen 1.4.6