diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-15 13:17:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:38:24 +0200 |
commit | 1e78bdc724e95898c04a3409b0b192aa7f77780b (patch) | |
tree | d26ae47ae9956612b5973f536219f0c9b455db03 /odb/view-result.hxx | |
parent | 5b0430fdf4617b396e462872d438a663b174a3a8 (diff) |
Implement early connection release
Diffstat (limited to 'odb/view-result.hxx')
-rw-r--r-- | odb/view-result.hxx | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/odb/view-result.hxx b/odb/view-result.hxx index d111e36..a07e5b8 100644 --- a/odb/view-result.hxx +++ b/odb/view-result.hxx @@ -29,8 +29,6 @@ namespace odb friend class result_iterator<T, class_view>; friend class result_iterator<const T, class_view>; - typedef odb::database database_type; - // In result_impl, T is always non-const and the same as view_type. // typedef T view_type; @@ -39,15 +37,9 @@ namespace odb typedef typename view_traits::pointer_type pointer_type; typedef odb::pointer_traits<pointer_type> pointer_traits; - view_result_impl (database_type& db) - : begin_ (true), end_ (false), db_ (db), current_ () - { - } - - database_type& - database () const + view_result_impl (connection& conn) + : result_impl (conn), begin_ (true), end_ (false), current_ () { - return db_; } // To make this work with all kinds of pointers (raw, std::auto_ptr, @@ -120,7 +112,6 @@ namespace odb bool end_; private: - database_type& db_; pointer_type current_; typename pointer_traits::guard guard_; }; |