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

Renamed bind and (in)validate to indicate their usage (vendor only)

This commit is contained in:
rbock 2014-06-29 11:35:51 +02:00
parent 0f9c1dbfb2
commit 2f20f7ef82
6 changed files with 31 additions and 31 deletions

View File

@ -118,12 +118,12 @@ namespace sqlpp
_value = _is_null ? false : (data[0] == 't' or data[0] == '1');
}
void validate()
void _validate()
{
_is_valid = true;
}
void invalidate()
void _invalidate()
{
_is_valid = false;
_is_null = true;

View File

@ -119,12 +119,12 @@ namespace sqlpp
_value = _is_null ? 0 : std::strtoll(data, nullptr, 10);
}
void validate()
void _validate()
{
_is_valid = true;
}
void invalidate()
void _invalidate()
{
_is_valid = false;
_is_null = true;

View File

@ -121,14 +121,14 @@ namespace sqlpp
_value = _is_null ? 0 : std::strtoll(data, nullptr, 10);
}
void invalidate()
void _invalidate()
{
_is_valid = false;
_is_null = true;
_value = 0;
}
void validate()
void _validate()
{
_is_valid = true;
}

View File

@ -47,14 +47,14 @@ namespace sqlpp
result_field() = default;
void validate()
void _validate()
{
_field::operator()().validate();
_field::operator()()._validate();
}
void invalidate()
void _invalidate()
{
_field::operator()().invalidate();
_field::operator()()._invalidate();
}
template<typename Target>
@ -72,14 +72,14 @@ namespace sqlpp
result_field() = default;
void validate()
void _validate()
{
_multi_field::operator()().validate();
_multi_field::operator()()._validate();
}
void invalidate()
void _invalidate()
{
_multi_field::operator()().invalidate();
_multi_field::operator()()._invalidate();
}
template<typename Target>
@ -97,16 +97,16 @@ namespace sqlpp
result_row_impl() = default;
void validate()
void _validate()
{
using swallow = int[];
(void) swallow{(result_field<Db, Is, NamedExprs>::validate(), 0)...};
(void) swallow{(result_field<Db, Is, NamedExprs>::_validate(), 0)...};
}
void invalidate()
void _invalidate()
{
using swallow = int[];
(void) swallow{(result_field<Db, Is, NamedExprs>::invalidate(), 0)...};
(void) swallow{(result_field<Db, Is, NamedExprs>::_invalidate(), 0)...};
}
template<typename Target>
@ -144,15 +144,15 @@ namespace sqlpp
result_row_t& operator=(const result_row_t&) = delete;
result_row_t& operator=(result_row_t&&) = default;
void validate()
void _validate()
{
_impl::validate();
_impl::_validate();
_is_valid = true;
}
void invalidate()
void _invalidate()
{
_impl::invalidate();
_impl::_invalidate();
_is_valid = false;
}
@ -211,24 +211,24 @@ namespace sqlpp
dynamic_result_row_t& operator=(const dynamic_result_row_t&) = delete;
dynamic_result_row_t& operator=(dynamic_result_row_t&&) = default;
void validate()
void _validate()
{
_impl::validate();
_impl::_validate();
_is_valid = true;
for (auto& field : _dynamic_fields)
{
field.second.validate();
field.second._validate();
}
}
void invalidate()
void _invalidate()
{
_impl::invalidate();
_impl::_invalidate();
_is_valid = false;
for (auto& field : _dynamic_fields)
{
field.second.invalidate();
field.second._invalidate();
}
}

View File

@ -117,12 +117,12 @@ namespace sqlpp
_len = _value_ptr ? len: 0;
}
void validate()
void _validate()
{
_is_valid = true;
}
void invalidate()
void _invalidate()
{
_is_valid = false;
_value_ptr = nullptr;

View File

@ -85,7 +85,7 @@ struct MockDb: public sqlpp::connection
template<typename ResultRow>
void next(ResultRow& result_row)
{
result_row.invalidate();
result_row._invalidate();
};
};