0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Cleanup some minor bind issues

This commit is contained in:
rbock 2014-01-28 06:50:21 +01:00
parent d85fdcd62b
commit 25c1cfb399
6 changed files with 21 additions and 22 deletions

View File

@ -88,9 +88,9 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t index) const
void _bind(Target& target, size_t index) const
{
target.bind_boolean_parameter(index, &_value, _is_null);
target._bind_boolean_parameter(index, &_value, _is_null);
}
private:
@ -148,9 +148,9 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t i)
void _bind(Target& target, size_t i)
{
target.bind_boolean_result(i, &_value, &_is_null);
target._bind_boolean_result(i, &_value, &_is_null);
}
private:

View File

@ -88,9 +88,9 @@ namespace sqlpp
operator _cpp_value_type() const { return _value; }
template<typename Target>
void bind(Target& target, size_t index) const
void _bind(Target& target, size_t index) const
{
target.bind_floating_point_parameter(index, &_value, _is_null);
target._bind_floating_point_parameter(index, &_value, _is_null);
}
private:
@ -150,9 +150,9 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t i)
void _bind(Target& target, size_t i)
{
target.bind_floating_point_result(i, &_value, &_is_null);
target._bind_floating_point_result(i, &_value, &_is_null);
}
private:

View File

@ -88,9 +88,9 @@ namespace sqlpp
operator _cpp_value_type() const { return _value; }
template<typename Target>
void bind(Target& target, size_t index) const
void _bind(Target& target, size_t index) const
{
target.bind_integral_parameter(index, &_value, _is_null);
target._bind_integral_parameter(index, &_value, _is_null);
}
private:
@ -150,9 +150,9 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t i)
void _bind(Target& target, size_t i)
{
target.bind_integral_result(i, &_value, &_is_null);
target._bind_integral_result(i, &_value, &_is_null);
}
private:

View File

@ -60,7 +60,7 @@ namespace sqlpp
void _bind_impl(Target& target, const index_t<index>&) const
{
const auto& parameter = static_cast<typename std::tuple_element<index, const _member_tuple_t>::type&>(*this)();
parameter.bind(target, index);
parameter._bind(target, index);
_bind_impl(target, index_t<index + 1>());
}

View File

@ -79,8 +79,7 @@ namespace sqlpp
template<typename Target>
void _bind(Target& target)
{
_field::operator()().bind(target, index);
std::cerr << "binding result " << index << std::endl;
_field::operator()()._bind(target, index);
_rest::_bind(target);
}
};
@ -120,9 +119,9 @@ namespace sqlpp
}
template<typename Target>
void _bind(const Target& target)
void _bind(Target& target)
{
_multi_field::_bind(target);
_multi_field::operator()()._bind(target);
_rest::_bind(target);
}
};

View File

@ -87,9 +87,9 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t index) const
void _bind(Target& target, size_t index) const
{
target.bind_text_parameter(index, &_value, _is_null);
target._bind_text_parameter(index, &_value, _is_null);
}
private:
@ -153,14 +153,14 @@ namespace sqlpp
operator _cpp_value_type() const { return value(); }
template<typename Target>
void bind(Target& target, size_t i)
void _bind(Target& target, size_t i)
{
target.bind_text_result(i, &_value_ptr, &_len);
target._bind_text_result(i, &_value_ptr, &_len);
}
private:
bool _is_valid;
char* _value_ptr;
const char* _value_ptr;
size_t _len;
};