diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-15 13:17:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-10-19 11:40:38 +0200 |
commit | 8097adf760d8cdf769cd7c50455f3b76d57ce35f (patch) | |
tree | 142e69c747bc5ef484d0083b43dd3eb163ef5afd | |
parent | defe5aec4edc065546d44ad17b48a2dd5290144d (diff) |
Implement early connection release
-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;"; |