aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-09-22 11:03:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-09-22 11:03:39 +0200
commitf2fcf90f47cf3ee8b1fc93ddd3d340279bf1d369 (patch)
tree5cd6babfddc8f2d5d9e05355828c0b0addb0f230
parent0636a81f69423763f48d2576a143e0ba361bcabc (diff)
Add const char[n] value_traits specialization in addition to char[n]1.6.0.a2
-rw-r--r--odb/mysql/traits.hxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/odb/mysql/traits.hxx b/odb/mysql/traits.hxx
index d10b414..630eaeb 100644
--- a/odb/mysql/traits.hxx
+++ b/odb/mysql/traits.hxx
@@ -454,20 +454,42 @@ namespace odb
};
template <std::size_t n>
+ struct default_value_traits<const char[n], id_string>:
+ c_string_value_traits
+ {
+ };
+
+ template <std::size_t n>
struct default_value_traits<char[n], id_decimal>: c_string_value_traits
{
};
template <std::size_t n>
+ struct default_value_traits<const char[n], id_decimal>:
+ c_string_value_traits
+ {
+ };
+
+ template <std::size_t n>
struct default_value_traits<char[n], id_enum>: c_string_value_traits
{
};
template <std::size_t n>
+ struct default_value_traits<const char[n], id_enum>: c_string_value_traits
+ {
+ };
+
+ template <std::size_t n>
struct default_value_traits<char[n], id_set>: c_string_value_traits
{
};
+ template <std::size_t n>
+ struct default_value_traits<const char[n], id_set>: c_string_value_traits
+ {
+ };
+
// std::vector<char> (buffer) specialization.
//
template <>
@@ -610,6 +632,12 @@ namespace odb
{
static const database_type_id db_type_id = id_string;
};
+
+ template <std::size_t n>
+ struct default_type_traits<const char[n]>
+ {
+ static const database_type_id db_type_id = id_string;
+ };
}
}