aboutsummaryrefslogtreecommitdiff
path: root/odb/no-id-object-result.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-10-15 13:17:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-10-19 11:38:24 +0200
commit1e78bdc724e95898c04a3409b0b192aa7f77780b (patch)
treed26ae47ae9956612b5973f536219f0c9b455db03 /odb/no-id-object-result.hxx
parent5b0430fdf4617b396e462872d438a663b174a3a8 (diff)
Implement early connection release
Diffstat (limited to 'odb/no-id-object-result.hxx')
-rw-r--r--odb/no-id-object-result.hxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/odb/no-id-object-result.hxx b/odb/no-id-object-result.hxx
index 21be2dc..16df125 100644
--- a/odb/no-id-object-result.hxx
+++ b/odb/no-id-object-result.hxx
@@ -26,8 +26,6 @@ namespace odb
class no_id_object_result_impl: public result_impl
{
protected:
- typedef odb::database database_type;
-
// In result_impl, T is always non-const and the same as object_type.
//
typedef T object_type;
@@ -44,15 +42,9 @@ namespace odb
friend class object_result_iterator<const T, void, false>;
protected:
- no_id_object_result_impl (database_type& db)
- : begin_ (true), end_ (false), db_ (db), current_ ()
- {
- }
-
- database_type&
- database () const
+ no_id_object_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,
@@ -135,7 +127,6 @@ namespace odb
load ();
private:
- database_type& db_;
pointer_type current_;
typename pointer_traits::guard guard_;
};