diff options
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | odb/relational/source.cxx | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -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;"; |