From 8097adf760d8cdf769cd7c50455f3b76d57ce35f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 15 Oct 2012 13:17:31 +0200 Subject: Implement early connection release --- NEWS | 6 ++++++ odb/relational/source.cxx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6c1b7e9..84a6330 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +Version 2.2.0 + + * Support for early connection release. Now the database connection is + released when commit()/rollback() is called rather than when the + transaction instance goes out of scope. + Version 2.1.0 * The ODB compiler is now capable of automatically discovering accessor and diff --git a/odb/relational/source.cxx b/odb/relational/source.cxx index 2c5d6cb..4d56655 100644 --- a/odb/relational/source.cxx +++ b/odb/relational/source.cxx @@ -2709,7 +2709,7 @@ traverse_object (type& c) } os << "shared_ptr<" << db << "::prepared_query_impl> r (" << endl - << "new (shared) " << db << "::prepared_query_impl);" + << "new (shared) " << db << "::prepared_query_impl (conn));" << "r->name = n;" << "r->execute = &execute_query;" << "r->query = q;" @@ -3615,7 +3615,7 @@ traverse_view (type& c) << "}"; os << "shared_ptr<" << db << "::prepared_query_impl> r (" << endl - << "new (shared) " << db << "::prepared_query_impl);" + << "new (shared) " << db << "::prepared_query_impl (conn));" << "r->name = n;" << "r->execute = &execute_query;"; -- cgit v1.1