aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-01-25 12:44:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-01-25 12:44:16 +0200
commit099898208c09542410884413d8d619f178c1ff3b (patch)
tree8489726a2a763ecdac33d28c926a984a33c5410f
parent057c8299fb1fec24338404b28f2b33473e547bc8 (diff)
By default map std::array<char, N> to string instead of binary
-rw-r--r--odb/mssql/traits.hxx26
1 files changed, 20 insertions, 6 deletions
diff --git a/odb/mssql/traits.hxx b/odb/mssql/traits.hxx
index 207a30a..5c3867c 100644
--- a/odb/mssql/traits.hxx
+++ b/odb/mssql/traits.hxx
@@ -2064,6 +2064,16 @@ namespace odb
static const database_type_id db_type_id = id_string;
};
+#ifdef ODB_CXX11
+ template <std::size_t N>
+ struct default_type_traits<std::array<char, N> >
+ {
+ // Ditto.
+ //
+ static const database_type_id db_type_id = id_string;
+ };
+#endif
+
template <>
struct default_type_traits<char>
{
@@ -2099,6 +2109,16 @@ namespace odb
static const database_type_id db_type_id = id_nstring;
};
+#ifdef ODB_CXX11
+ template <std::size_t N>
+ struct default_type_traits<std::array<wchar_t, N> >
+ {
+ // Ditto.
+ //
+ static const database_type_id db_type_id = id_nstring;
+ };
+#endif
+
template <>
struct default_type_traits<wchar_t>
{
@@ -2127,12 +2147,6 @@ namespace odb
#ifdef ODB_CXX11
template <std::size_t N>
- struct default_type_traits<std::array<char, N> >
- {
- static const database_type_id db_type_id = id_long_binary;
- };
-
- template <std::size_t N>
struct default_type_traits<std::array<unsigned char, N> >
{
static const database_type_id db_type_id = id_long_binary;