aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/query-dynamic.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-11-21 13:11:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-11-21 13:11:43 +0200
commita2914e837c6442db936fd035b49f60ee488df533 (patch)
tree112ef78437897d22148d07292a19a15b7fd8a58b /odb/sqlite/query-dynamic.ixx
parent14d0ecab529bc46ebadd319cd4dbc1c99bb53e6b (diff)
Add dynamic multi-database query support
Diffstat (limited to 'odb/sqlite/query-dynamic.ixx')
-rw-r--r--odb/sqlite/query-dynamic.ixx27
1 files changed, 27 insertions, 0 deletions
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 <typename T, database_type_id ID>
+ inline query_column<T, ID>::
+ query_column (odb::query_column<T>& 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<query_column_base*> (this);
+
+ // For some reason GCC needs this statically-typed pointer in
+ // order to instantiate the functions.
+ //
+ query_param_factory f (&query_param_factory_impl<T, ID>);
+ ci.param_factory = reinterpret_cast<void*> (f);
+ }
+ }
+}