diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-30 10:03:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-04-30 10:37:35 +0200 |
commit | f1d06b7994d8b0aa31f86288183f46509bb78c19 (patch) | |
tree | 468b44ecedf0566fcf4c279064446d0ef661c293 /odb/database.ixx | |
parent | d4be234991f2a2e6abd8b2c0d585eb4ae6216979 (diff) |
Add transaction::connection(database&) overload
Diffstat (limited to 'odb/database.ixx')
-rw-r--r-- | odb/database.ixx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/odb/database.ixx b/odb/database.ixx index 5f874bc..c3cf2e2 100644 --- a/odb/database.ixx +++ b/odb/database.ixx @@ -674,7 +674,7 @@ namespace odb inline prepared_query<T> database:: prepare_query (const char* n, const odb::query<T>& q) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); return c.prepare_query (n, q); } @@ -682,7 +682,7 @@ namespace odb inline void database:: cache_query (const prepared_query<T>& pq) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); c.cache_query (pq); } @@ -691,7 +691,7 @@ namespace odb inline void database:: cache_query (const prepared_query<T>& pq, std::unique_ptr<P> params) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); c.cache_query (pq, std::move (params)); } #else @@ -699,24 +699,24 @@ namespace odb inline void database:: cache_query (const prepared_query<T>& pq, std::auto_ptr<P> params) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); c.cache_query (pq, params); } #endif template <typename T> inline prepared_query<T> database:: - lookup_query (const char* name) const + lookup_query (const char* name) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); return c.lookup_query<T> (name); } template <typename T, typename P> inline prepared_query<T> database:: - lookup_query (const char* name, P*& params) const + lookup_query (const char* name, P*& params) { - connection_type& c (transaction::current ().connection ()); + connection_type& c (transaction::current ().connection (*this)); return c.lookup_query<T, P> (name, params); } |