diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-28 09:45:36 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-28 09:45:36 +0200 |
commit | ab1487672afb5180bd17c9d26b35196bd06f6cda (patch) | |
tree | 51cc25e1b88cb0abc325a822f57845a98a22cb8a /sqlite/types/driver.cxx | |
parent | a461f6d8bc6c314249057ad48fa8dd1cea1d8b40 (diff) |
Add value_traits specializations for std::vector<char>
This allows using it as a buffer for BLOB mapping.
Diffstat (limited to 'sqlite/types/driver.cxx')
-rw-r--r-- | sqlite/types/driver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlite/types/driver.cxx b/sqlite/types/driver.cxx index 855cada..3c14c7a 100644 --- a/sqlite/types/driver.cxx +++ b/sqlite/types/driver.cxx @@ -13,6 +13,7 @@ #include <odb/sqlite/database.hxx> #include <odb/sqlite/transaction.hxx> +#include <common/buffer.hxx> #include <common/common.hxx> #include "test.hxx" @@ -35,10 +36,9 @@ main (int argc, char* argv[]) o.real_ = 1.123; string long_str (2040, 'l'); - buffer long_buf (long_str.c_str (), long_str.size ()); o.text_ = long_str; - o.blob_ = long_buf; + o.blob_.assign (long_str.c_str (), long_str.c_str () + long_str.size ()); { transaction t (db->begin ()); |