00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HK_ACTIONQUERY
00012 #define HK_ACTIONQUERY
00013 #include <hk_data.h>
00014 using namespace std;
00015 class hk_database;
00016 class hk_actionqueryprivate;
00029 class hk_actionquery: public hk_data
00030 {
00031 friend class hk_database;
00032 friend class hk_datasource;
00033 public:
00034 virtual ~hk_actionquery(void);
00035 enum_datasourcetypes type(void);
00042 void set_sql(const char*s, unsigned long l);
00043 void set_sql(const hk_string& s,bool convertdelimiter=false);
00044 const char* sql(void);
00045 unsigned long length(void);
00050 bool execute(void);
00051
00052 protected:
00053 hk_actionquery(hk_database* db);
00054 virtual bool driver_specific_execute(void){return false;}
00055 virtual bool driver_specific_sql(const char*s);
00056 virtual void before_source_vanishes(void);
00057 const char* p_sql;
00058 unsigned long p_length;
00059 void print_sql(void);
00060 hk_string sqlconvertdelimiter(const hk_string& );
00061 private:
00062 hk_database* p_database;
00063 hk_actionqueryprivate* p_private;
00064
00065 };
00066 #endif