aboutsummaryrefslogtreecommitdiff
path: root/common/query
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-09-21 19:55:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-09-21 19:55:14 +0200
commit26d4b0a333e327d7ef42c67db4c06918bafb1d84 (patch)
tree74a424a54bdbe0d79d15e8dec7188d6b5f6df6b6 /common/query
parente291e5d0661c7980a969a243f8a6512d1b9cf5df (diff)
Redesign value_traits
Diffstat (limited to 'common/query')
-rw-r--r--common/query/traits.hxx12
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