diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-11 12:03:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-01-11 12:03:16 +0200 |
commit | 2128d342ad4518604e941d03ad57efaad77842ad (patch) | |
tree | 35efab707b5cba7bc28a8bd51b595f218f2471f9 | |
parent | 6a55529bed1542e6221cd81df36b206d6dfac8da (diff) |
Remove bogus <std::string, id_numeric> traits
-rw-r--r-- | odb/pgsql/traits.cxx | 4 | ||||
-rw-r--r-- | odb/pgsql/traits.hxx | 38 |
2 files changed, 5 insertions, 37 deletions
diff --git a/odb/pgsql/traits.cxx b/odb/pgsql/traits.cxx index 550f7c7..ec220ff 100644 --- a/odb/pgsql/traits.cxx +++ b/odb/pgsql/traits.cxx @@ -13,10 +13,10 @@ namespace odb using details::buffer; // - // string_value_traits + // default_value_traits<std::string, id_string> // - void string_value_traits:: + void default_value_traits<std::string, id_string>:: set_image (buffer& b, size_t& n, bool& is_null, diff --git a/odb/pgsql/traits.hxx b/odb/pgsql/traits.hxx index f5c6f8d..0267527 100644 --- a/odb/pgsql/traits.hxx +++ b/odb/pgsql/traits.hxx @@ -41,7 +41,7 @@ namespace odb id_integer, id_bigint, - id_numeric, + id_numeric, // Internal PostgreSQL binary representation. id_real, id_double, @@ -377,9 +377,9 @@ namespace odb // std::string specialization. // - class LIBODB_PGSQL_EXPORT string_value_traits + template <> + struct LIBODB_PGSQL_EXPORT default_value_traits<std::string, id_string> { - public: typedef std::string value_type; typedef std::string query_type; typedef details::buffer image_type; @@ -403,18 +403,6 @@ namespace odb const std::string&); }; - template <> - struct LIBODB_PGSQL_EXPORT default_value_traits<std::string, id_numeric>: - string_value_traits - { - }; - - template <> - struct LIBODB_PGSQL_EXPORT default_value_traits<std::string, id_string>: - string_value_traits - { - }; - // const char* specialization // // Specialization for const char* which only supports initialization @@ -435,13 +423,6 @@ namespace odb }; template <> - struct LIBODB_PGSQL_EXPORT default_value_traits<const char*, id_numeric>: - c_string_value_traits - { - typedef const char* query_type; - }; - - template <> struct LIBODB_PGSQL_EXPORT default_value_traits<const char*, id_string>: c_string_value_traits { @@ -449,19 +430,6 @@ namespace odb }; template <std::size_t N> - struct default_value_traits<char[N], id_numeric>: c_string_value_traits - { - typedef char query_type[N]; - }; - - template <std::size_t N> - struct default_value_traits<const char[N], id_numeric>: - c_string_value_traits - { - typedef const char query_type[N]; - }; - - template <std::size_t N> struct default_value_traits<char[N], id_string>: c_string_value_traits { typedef char query_type[N]; |