00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SIMPLEDB_QUERY_H_
00027 #define _SIMPLEDB_QUERY_H_
00028
00029 #include <string>
00030 #include <memory>
00031 #include "Exception.h"
00032 #include "macros.h"
00033
00034 namespace SimpleDB {
00035
00036 class Column;
00037 class Database;
00038 struct DatabasePimplData;
00039
00042 struct QueryPimplData;
00043
00048 class Query {
00049
00050 friend class Database;
00051
00052 public:
00053
00057 Query(Database& database);
00058
00064 DEPRECATED(Query(const Query& that));
00065
00069 class Exception : public SimpleDB::Exception {
00070 public:
00071 Exception(const std::string& message) : SimpleDB::Exception(message) {};
00072 };
00073
00076 ~Query();
00077
00083 void bind(Column* columns[], int numberColumns);
00084
00085
00094 void execute(const std::string& sqlQuery);
00095
00100 bool fetchRow();
00101
00102 private:
00103
00104 std::auto_ptr<QueryPimplData> pimplData;
00105
00108 const Query& operator=(const Query& b);
00109
00110 };
00111 }
00112
00113 #endif