0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

Test with boolean and text parameters in prepared query compiles and runs

with mysql
This commit is contained in:
Roland Bock 2014-01-04 19:32:18 +01:00
parent c140e13510
commit 409fa3baac
2 changed files with 12 additions and 0 deletions

View File

@ -113,6 +113,12 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); } operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t index) const
{
target.bind_boolean_parameter(index, &_value, _is_null);
}
private: private:
bool _trivial_value_is_null; bool _trivial_value_is_null;
signed char _value; signed char _value;

View File

@ -102,6 +102,12 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); } operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t index) const
{
target.bind_text_parameter(index, &_value, _is_null);
}
private: private:
bool _trivial_value_is_null; bool _trivial_value_is_null;
_cpp_value_type _value; _cpp_value_type _value;