From a2914e837c6442db936fd035b49f60ee488df533 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 21 Nov 2012 13:11:43 +0200 Subject: Add dynamic multi-database query support --- odb/sqlite/query-dynamic.ixx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 odb/sqlite/query-dynamic.ixx (limited to 'odb/sqlite/query-dynamic.ixx') diff --git a/odb/sqlite/query-dynamic.ixx b/odb/sqlite/query-dynamic.ixx new file mode 100644 index 0000000..77f0f43 --- /dev/null +++ b/odb/sqlite/query-dynamic.ixx @@ -0,0 +1,27 @@ +// file : odb/sqlite/query-dynamic.ixx +// copyright : Copyright (c) 2005-2012 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +namespace odb +{ + namespace sqlite + { + // + // + template + inline query_column:: + query_column (odb::query_column& qc, + const char* table, const char* column, const char* conv) + : query_column_base (table, column, conv) + { + native_column_info& ci (qc.native_info[id_sqlite]); + ci.column = static_cast (this); + + // For some reason GCC needs this statically-typed pointer in + // order to instantiate the functions. + // + query_param_factory f (&query_param_factory_impl); + ci.param_factory = reinterpret_cast (f); + } + } +} -- cgit v1.1