diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-21 19:55:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-21 19:55:14 +0200 |
commit | 26d4b0a333e327d7ef42c67db4c06918bafb1d84 (patch) | |
tree | 74a424a54bdbe0d79d15e8dec7188d6b5f6df6b6 /common/query | |
parent | e291e5d0661c7980a969a243f8a6512d1b9cf5df (diff) |
Redesign value_traits
Diffstat (limited to 'common/query')
-rw-r--r-- | common/query/traits.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/common/query/traits.hxx b/common/query/traits.hxx index 125929c..43b1bcc 100644 --- a/common/query/traits.hxx +++ b/common/query/traits.hxx @@ -17,20 +17,20 @@ namespace odb namespace mysql { template <> - class value_traits<std::auto_ptr<std::string> > + class value_traits<std::auto_ptr<std::string>, details::buffer> { public: - typedef std::auto_ptr<std::string> type; - typedef std::string value_type; - static const image_id_type image_id = id_string; + typedef std::auto_ptr<std::string> value_type; + typedef std::string query_type; + typedef details::buffer image_type; static void set_value (std::auto_ptr<std::string>& v, - const char* s, + const details::buffer& b, std::size_t n, bool is_null) { - v.reset (is_null ? 0 : new std::string (s, n)); + v.reset (is_null ? 0 : new std::string (b.data (), n)); } static void |