diff options
Diffstat (limited to 'odb/oracle/traits.hxx')
-rw-r--r-- | odb/oracle/traits.hxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/odb/oracle/traits.hxx b/odb/oracle/traits.hxx index d156fb3..efe35b1 100644 --- a/odb/oracle/traits.hxx +++ b/odb/oracle/traits.hxx @@ -582,6 +582,33 @@ namespace odb { }; + // std::vector specialization for RAW. + // + template <> + struct default_value_traits<std::vector<char>, id_raw> + { + public: + typedef std::vector<char> value_type; + typedef std::vector<char> query_type; + typedef lob_callback image_type; + + static void + set_value (value_type& v, const char* b, std::size_t n, bool is_null) + { + if (!is_null) + v.assign (b, b + n); + else + v.clear (); + } + + static void + set_image (char* b, + std::size_t c, + std::size_t& n, + bool& is_null, + const value_type& v); + }; + // std::string specialization for LOBs. // class string_lob_value_traits |