aboutsummaryrefslogtreecommitdiff
path: root/odb/database.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/database.ixx')
-rw-r--r--odb/database.ixx17
1 files changed, 8 insertions, 9 deletions
diff --git a/odb/database.ixx b/odb/database.ixx
index fa16f71..c3cf2e2 100644
--- a/odb/database.ixx
+++ b/odb/database.ixx
@@ -1,5 +1,4 @@
// file : odb/database.ixx
-// copyright : Copyright (c) 2009-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <cstring> // std::strlen()
@@ -675,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);
}
@@ -683,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);
}
@@ -692,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
@@ -700,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);
}