aboutsummaryrefslogtreecommitdiff
path: root/odb/database.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/database.ixx')
-rw-r--r--odb/database.ixx16
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);
}