aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/result.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-10 11:17:52 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-10 11:17:52 +0200
commit0a589394a09ce5b3f16d902d657710a2886cc2fc (patch)
tree08f5bfa47a0d07b0dc20352706342e17f277759f /odb/mysql/result.hxx
parentc67f076c75a36877ce142dc43a1ed2292ab8117a (diff)
Add query support
Diffstat (limited to 'odb/mysql/result.hxx')
-rw-r--r--odb/mysql/result.hxx51
1 files changed, 51 insertions, 0 deletions
diff --git a/odb/mysql/result.hxx b/odb/mysql/result.hxx
new file mode 100644
index 0000000..d852bc6
--- /dev/null
+++ b/odb/mysql/result.hxx
@@ -0,0 +1,51 @@
+// file : odb/mysql/result.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_MYSQL_RESULT_HXX
+#define ODB_MYSQL_RESULT_HXX
+
+#include <odb/result.hxx>
+#include <odb/shared-ptr.hxx>
+
+#include <odb/mysql/version.hxx>
+#include <odb/mysql/forward.hxx>
+#include <odb/mysql/statement.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ template <typename T>
+ class result_impl: public odb::result_impl<T>
+ {
+ public:
+ typedef object_traits<T> traits;
+ typedef typename traits::pointer_type pointer_type;
+ typedef typename traits::pointer_ops pointer_ops;
+
+ virtual
+ ~result_impl ();
+
+ result_impl (shared_ptr<query_statement> statement,
+ object_statements<T>& statements);
+
+ pointer_type
+ current (bool release);
+
+ void
+ next ();
+
+ private:
+ pointer_type cur_;
+ shared_ptr<query_statement> statement_;
+ object_statements<T>& statements_;
+ query_statement::result state_;
+ };
+ }
+}
+
+#include <odb/mysql/result.txx>
+
+#endif // ODB_MYSQL_RESULT_HXX