From fe6f7e0c6b3e823632e44bcf5a4a618e5b20d516 Mon Sep 17 00:00:00 2001 From: Evgeniy Gatov Date: Thu, 19 May 2011 06:14:54 +0000 Subject: [PATCH] libmysqlxx/ updates for null type values support --- libs/libmysqlxx/include/mysqlxx/Manip.h | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/libs/libmysqlxx/include/mysqlxx/Manip.h b/libs/libmysqlxx/include/mysqlxx/Manip.h index 09f6464b710..ff071c8e64e 100644 --- a/libs/libmysqlxx/include/mysqlxx/Manip.h +++ b/libs/libmysqlxx/include/mysqlxx/Manip.h @@ -115,6 +115,19 @@ struct EscapeManipResult return ostr; } + template + std::ostream & operator<< (const Null & value) + { + if(value.is_null) + { + ostr << "\\N"; + } + else + { + *this << value.data; + } + return ostr ; + } private: @@ -183,6 +196,19 @@ public: ostr.put('\''); return ostr; } + template + std::ostream & operator<< (const Null & value) + { + if(value.is_null) + { + ostr << "\\N"; + } + else + { + *this << value.data; + } + return ostr ; + } private: