From 1e78bdc724e95898c04a3409b0b192aa7f77780b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Oct 2012 13:17:30 +0200 Subject: Implement early connection release --- odb/result.hxx | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'odb/result.hxx') 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 -- cgit v1.1