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/result.hxx | |
parent | 5b0430fdf4617b396e462872d438a663b174a3a8 (diff) |
Implement early connection release
Diffstat (limited to 'odb/result.hxx')
-rw-r--r-- | odb/result.hxx | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/odb/result.hxx b/odb/result.hxx index b85242f..9f590d0 100644 --- a/odb/result.hxx +++ b/odb/result.hxx @@ -16,10 +16,36 @@ namespace odb { - struct result_impl: details::shared_base + class result_impl: public details::shared_base { + public: virtual ~result_impl (); + + virtual void + invalidate () = 0; + + protected: + result_impl (connection&); + + protected: + database& db_; + connection& conn_; + + // Doubly-linked list of results. + // + // prev_ == 0 means we are the first element. + // next_ == 0 means we are the last element. + // next_ == this means we are not on the list. + // + protected: + friend class connection; + + void + list_remove (); + + result_impl* prev_; + result_impl* next_; }; template <typename T, class_kind kind> |