Databaseconnectionclasses  0.5.3
hk_actionquery.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_classes 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 #ifndef HK_ACTIONQUERY
12 #define HK_ACTIONQUERY
13 #include <hk_data.h>
14 using namespace std;
15 class hk_database;
29 class hk_actionquery: public hk_data
30 {
31  friend class hk_database;
32  friend class hk_datasource;
33  public:
34  virtual ~hk_actionquery(void);
35  enum_datasourcetypes type(void);
42  void set_sql(const char*s, unsigned long l);
43  void set_sql(const hk_string& s,bool convertdelimiter=false);
44  const char* sql(void);
45  unsigned long length(void);
50  bool execute(void);
51 
52  protected:
54  virtual bool driver_specific_execute(void){return false;}
55  virtual bool driver_specific_sql(const char*s);
56  virtual void before_source_vanishes(void);
57  const char* p_sql;
58  unsigned long p_length;
59  void print_sql(void);
60  hk_string sqlconvertdelimiter(const hk_string& );
61  private:
62  hk_database* p_database;
63  hk_actionqueryprivate* p_private;
64 
65 };
66 #endif
represents a particular database on the SQL Server
Definition: hk_database.h:48
represents a resultquery or a table of a database.
Definition: hk_datasource.h:45
Definition: hk_actionquery.cpp:18
Base class for all kind of queries.
Definition: hk_data.h:26
bool set_sql(const hk_string &s, bool rawsql=false, bool registerchange=true)
Definition: hk_datasource.cpp:753
enum_datasourcetypes
Definition: hk_data.h:41
Action query (i.e. ALTER TABLE) with no result.
Definition: hk_actionquery.h:29