CompleteDB Embedded: Direct C++ API  2.4.2
Statement.hpp
Go to the documentation of this file.
1 #ifndef COMPLETEDB_STATEMENT_HPP
2 #define COMPLETEDB_STATEMENT_HPP
3 
4 #include "CompleteDb.h"
6 #include "completedb/Object.hpp"
8 
9 namespace completedb {
10 
16 class Statement
17 : public virtual Object
18 , public FastStatement
19 {
20 
21 public: // override Object iface
22 
26  virtual bool cast(const Object& from) { return completedb_Statement_cast(&m, from.get(), from.getClassType()); }
30  virtual bool isConnected() const { return completedb_Statement_isConnected(m); }
34  virtual bool isDisconnected() const { return completedb_Statement_isDisconnected(m); }
43 
44 public: // override LastError iface
45 
53  virtual const char* getLastError() const { return completedb_Statement_getLastError(m); }
54 
55 public: // override FastStatement iface
56 
60  virtual bool prepare() { return completedb_Statement_prepare(m); }
61 
62 public: // iface
63 
67  virtual bool execute() { return completedb_Statement_execute(m); }
68 
69 public: // factory lvalue
70 
71  Statement& operator=(const Statement& src) { completedb_Statement_assign(&m, src.m, src.getClassType()); return *this; }
73 
74 public: // factory
75 
78 
79 private: // factory
80 
81  Statement(void* src) : Object(src) {}
82 
83 };
84 
85 } // namespace
86 
87 #endif /* COMPLETEDB_STATEMENT_HPP */