diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-06 16:54:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-09-06 16:54:06 +0200 |
commit | 1b1cb92a27592da6ab9300b2c5c8384f7588e2af (patch) | |
tree | 2c4a92f14c303ff3aaced4e7b073f7180c0c5d6a /odb/sqlite/result.hxx | |
parent | 7d3f2b0badf4298bca53936d22a0a22c74538713 (diff) |
Support for views; native part
Diffstat (limited to 'odb/sqlite/result.hxx')
-rw-r--r-- | odb/sqlite/result.hxx | 59 |
1 files changed, 12 insertions, 47 deletions
diff --git a/odb/sqlite/result.hxx b/odb/sqlite/result.hxx index 4f1cc2c..1417a6c 100644 --- a/odb/sqlite/result.hxx +++ b/odb/sqlite/result.hxx @@ -8,14 +8,15 @@ #include <odb/pre.hxx> -#include <cstddef> // std::size_t - +#include <odb/traits.hxx> #include <odb/result.hxx> + #include <odb/details/shared-ptr.hxx> #include <odb/sqlite/version.hxx> #include <odb/sqlite/forward.hxx> // query, query_params #include <odb/sqlite/statement.hxx> + #include <odb/sqlite/details/export.hxx> namespace odb @@ -35,54 +36,18 @@ namespace odb details::shared_ptr<select_statement> statement_; }; - template <typename T> - class result_impl: public odb::result_impl<T>, public result_impl_base - { - public: - typedef typename odb::result_impl<T>::pointer_type pointer_type; - typedef typename odb::result_impl<T>::pointer_traits pointer_traits; - - typedef typename odb::result_impl<T>::object_type object_type; - typedef typename odb::result_impl<T>::id_type id_type; - typedef typename odb::result_impl<T>::object_traits object_traits; - - - virtual - ~result_impl (); - - result_impl (const query&, - details::shared_ptr<select_statement>, - object_statements<object_type>&); - - virtual void - load (object_type&); - - virtual id_type - load_id (); - - virtual void - next (); - - virtual void - cache (); - - virtual std::size_t - size (); - - using odb::result_impl<T>::current; - - private: - void - load_image (); - - private: - object_statements<object_type>& statements_; - }; + template <typename T, class_kind kind> + class result_impl; } } -#include <odb/sqlite/result.txx> - #include <odb/post.hxx> #endif // ODB_SQLITE_RESULT_HXX + +// Include result specializations so that the user code only needs +// to include this header. +// + +#include <odb/sqlite/object-result.hxx> +#include <odb/sqlite/view-result.hxx> |