From 1b1cb92a27592da6ab9300b2c5c8384f7588e2af Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Sep 2011 16:54:06 +0200 Subject: Support for views; native part --- odb/sqlite/object-result.hxx | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 odb/sqlite/object-result.hxx (limited to 'odb/sqlite/object-result.hxx') diff --git a/odb/sqlite/object-result.hxx b/odb/sqlite/object-result.hxx new file mode 100644 index 0000000..b3dbf2b --- /dev/null +++ b/odb/sqlite/object-result.hxx @@ -0,0 +1,77 @@ +// file : odb/sqlite/object-result.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_SQLITE_OBJECT_RESULT_HXX +#define ODB_SQLITE_OBJECT_RESULT_HXX + +#include + +#include // std::size_t + +#include + +#include +#include // query, object_statements +#include +#include + +namespace odb +{ + namespace sqlite + { + template + class result_impl: + public odb::result_impl, + public result_impl_base + { + public: + typedef odb::result_impl base_type; + + typedef typename base_type::pointer_type pointer_type; + typedef typename base_type::pointer_traits pointer_traits; + + typedef typename base_type::object_type object_type; + typedef typename base_type::id_type id_type; + typedef typename base_type::object_traits object_traits; + + virtual + ~result_impl (); + + result_impl (const query&, + details::shared_ptr, + object_statements&); + + virtual void + load (object_type&); + + virtual id_type + load_id (); + + virtual void + next (); + + virtual void + cache (); + + virtual std::size_t + size (); + + using base_type::current; + + private: + void + load_image (); + + private: + object_statements& statements_; + }; + } +} + +#include + +#include + +#endif // ODB_SQLITE_OBJECT_RESULT_HXX -- cgit v1.1