00001 /* This is for emacs: -*-Mode: C++;-*- */ 00002 #if !defined(__INC_GQL_STATEMENT_H) 00003 #define __INC_GQL_STATEMENT_H 00004 00005 #include <gql++/warnable.h> 00006 #include <gql++/connection.h> 00007 00008 namespace GQL 00009 { 00010 00011 class ResultSet; 00012 00013 class Statement : public Warnable 00014 { 00015 public: 00016 Statement(Connection *conn) : conn_(conn) { } 00017 virtual ~Statement() { } 00018 00019 virtual bool execute(const std::string& sql) = 0; 00020 00021 virtual ResultSet *execute_query(const std::string& sql) = 0; 00022 virtual int execute_update(const std::string& sql) = 0; 00023 00024 virtual int get_update_count() const = 0; 00025 00026 Connection *get_connection() { return conn_; } 00027 const Connection *get_connection() const { return conn_; } 00028 00029 virtual ResultSet *get_result_set() = 0; 00030 virtual bool get_more_results() = 0; 00031 00032 virtual int get_fetch_size() const = 0; 00033 virtual void set_fetch_size(int size) = 0; 00034 00035 virtual int get_max_field_size() const = 0; 00036 virtual void set_max_field_size(int size) = 0; 00037 00038 virtual int get_max_rows() const = 0; 00039 virtual void set_max_rows(int num) = 0; 00040 private: 00041 Connection *conn_; 00042 }; 00043 00044 00045 } 00046 00047 #endif