From 409fa3baaca2eb57c2a6c191be5378a9c55f4175 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Sat, 4 Jan 2014 19:32:18 +0100 Subject: [PATCH] Test with boolean and text parameters in prepared query compiles and runs with mysql --- include/sqlpp11/boolean.h | 6 ++++++ include/sqlpp11/text.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/include/sqlpp11/boolean.h b/include/sqlpp11/boolean.h index f2d743c8..fa86f3c6 100644 --- a/include/sqlpp11/boolean.h +++ b/include/sqlpp11/boolean.h @@ -113,6 +113,12 @@ namespace sqlpp operator _cpp_value_type() const { return value(); } + template + void bind(Target& target, size_t index) const + { + target.bind_boolean_parameter(index, &_value, _is_null); + } + private: bool _trivial_value_is_null; signed char _value; diff --git a/include/sqlpp11/text.h b/include/sqlpp11/text.h index 3947bb16..f003c115 100644 --- a/include/sqlpp11/text.h +++ b/include/sqlpp11/text.h @@ -102,6 +102,12 @@ namespace sqlpp operator _cpp_value_type() const { return value(); } + template + void bind(Target& target, size_t index) const + { + target.bind_text_parameter(index, &_value, _is_null); + } + private: bool _trivial_value_is_null; _cpp_value_type _value;