aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/pgsql/traits.cxx4
-rw-r--r--odb/pgsql/traits.hxx38
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];