diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-25 12:44:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-25 12:44:16 +0200 |
commit | 4e33546b4c0a29d879a38029ad103374d4a779ef (patch) | |
tree | af29b0ad666032a68ab695b2d28992b528b82d9a | |
parent | 10a88bacf1ec2b8b0700a27ea022d503f295825d (diff) |
By default map std::array<char, N> to string instead of binary
-rw-r--r-- | odb/pgsql/traits.hxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/odb/pgsql/traits.hxx b/odb/pgsql/traits.hxx index 7983571..448bb23 100644 --- a/odb/pgsql/traits.hxx +++ b/odb/pgsql/traits.hxx @@ -897,6 +897,14 @@ 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> > + { + static const database_type_id db_type_id = id_string; + }; +#endif + template <> struct default_type_traits<char> { @@ -925,12 +933,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_bytea; - }; - - template <std::size_t N> struct default_type_traits<std::array<unsigned char, N> > { static const database_type_id db_type_id = id_bytea; |