From e04895dcc4008a8c0cf53f34ef787a9c686ebcde 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/mssql/query-dynamic.ixx | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 odb/mssql/query-dynamic.ixx (limited to 'odb/mssql/query-dynamic.ixx') diff --git a/odb/mssql/query-dynamic.ixx b/odb/mssql/query-dynamic.ixx new file mode 100644 index 0000000..7e9decc --- /dev/null +++ b/odb/mssql/query-dynamic.ixx @@ -0,0 +1,31 @@ +// file : odb/mssql/query-dynamic.ixx +// copyright : Copyright (c) 2005-2012 Code Synthesis Tools CC +// license : ODB NCUEL; see accompanying LICENSE file + +namespace odb +{ + namespace mssql + { + // + // + template + inline query_column:: + query_column (odb::query_column& qc, + const char* table, + const char* column, + const char* conv, + unsigned short prec, + unsigned short scale) + : query_column_base (table, column, conv, prec, scale) + { + native_column_info& ci (qc.native_info[id_mssql]); + 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