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/traits.hxx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'odb/mssql/traits.hxx') diff --git a/odb/mssql/traits.hxx b/odb/mssql/traits.hxx index f31c38d..d1399aa 100644 --- a/odb/mssql/traits.hxx +++ b/odb/mssql/traits.hxx @@ -612,7 +612,6 @@ namespace odb { public: typedef const char* value_type; - typedef const char* query_type; typedef char* image_type; static void @@ -637,17 +636,20 @@ namespace odb struct LIBODB_MSSQL_EXPORT default_value_traits: c_string_value_traits { + typedef const char* query_type; }; template struct default_value_traits: c_string_value_traits { + typedef char query_type[N]; }; template struct default_value_traits: c_string_value_traits { + typedef const char query_type[N]; }; // std::string specialization for long_string. @@ -706,7 +708,6 @@ namespace odb { public: typedef const char* value_type; - typedef const char* query_type; typedef long_callback image_type; static void @@ -735,18 +736,21 @@ namespace odb id_long_string>: c_string_long_value_traits { + typedef const char* query_type; }; template struct default_value_traits: c_string_long_value_traits { + typedef char query_type[N]; }; template struct default_value_traits: c_string_long_value_traits { + typedef const char query_type[N]; }; // std::wstring specialization for nstring. @@ -829,7 +833,6 @@ namespace odb { public: typedef const wchar_t* value_type; - typedef const wchar_t* query_type; typedef ucs2_char* image_type; typedef wstring_functions<> functions; @@ -856,18 +859,21 @@ namespace odb id_nstring>: c_wstring_value_traits { + typedef const wchar_t* query_type; }; template struct default_value_traits: c_wstring_value_traits { + typedef wchar_t query_type[N]; }; template struct default_value_traits: c_wstring_value_traits { + typedef const wchar_t query_type[N]; }; // std::wstring specialization for long_nstring. @@ -961,7 +967,6 @@ namespace odb struct LIBODB_MSSQL_EXPORT c_wstring_long_value_traits<2> { typedef const wchar_t* value_type; - typedef const wchar_t* query_type; typedef long_callback image_type; static void @@ -990,7 +995,6 @@ namespace odb struct LIBODB_MSSQL_EXPORT c_wstring_long_value_traits<4> { typedef const wchar_t* value_type; - typedef const wchar_t* query_type; typedef long_callback image_type; static void @@ -1020,18 +1024,21 @@ namespace odb id_long_nstring>: c_wstring_long_value_traits<> { + typedef const wchar_t* query_type; }; template struct default_value_traits: c_wstring_long_value_traits<> { + typedef wchar_t query_type[N]; }; template struct default_value_traits: c_wstring_long_value_traits<> { + typedef const wchar_t query_type[N]; }; // std::vector (buffer) specialization for binary. @@ -1095,7 +1102,7 @@ namespace odb struct c_array_binary_value_traits { typedef C* value_type; - typedef const C* query_type; + typedef C query_type[N]; typedef char* image_type; static void @@ -1283,7 +1290,7 @@ namespace odb struct c_array_long_binary_value_traits { typedef C* value_type; - typedef const C* query_type; + typedef C query_type[N]; typedef long_callback image_type; static void -- cgit v1.1