aboutsummaryrefslogtreecommitdiff
path: root/odb/connection.cxx
diff options
context:
space:
mode:
authorMichael Shepanski <michael@codesynthesis.com>2014-10-30 15:21:32 +1100
committerMichael Shepanski <michael@codesynthesis.com>2014-10-31 08:39:49 +1100
commit1f217e38f7507758da1d33d46e675e801621aa38 (patch)
treebad382ee315a820ec08bd2a83eaece12ac8169e3 /odb/connection.cxx
parent31af5a488f2be9f4059e159492d4fe62f25a895a (diff)
Allow lambdas & std::functions as query factories with C++-98 builds of libodb
Diffstat (limited to 'odb/connection.cxx')
-rw-r--r--odb/connection.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/odb/connection.cxx b/odb/connection.cxx
index 4319f9f..14e89e2 100644
--- a/odb/connection.cxx
+++ b/odb/connection.cxx
@@ -96,16 +96,11 @@ namespace odb
if (i == prepared_map_.end ())
{
- // See if there is a factory.
+ // Use a factory, if there is one.
//
- database_type::query_factory_type f (
- database_.lookup_query_factory (name));
-
- if (f)
- {
- f (name, const_cast<connection&> (*this));
+ if (database_.call_query_factory (name,
+ const_cast<connection&> (*this)))
i = prepared_map_.find (name);
- }
}
if (i == prepared_map_.end ())