mirror of
https://github.com/rbock/sqlpp11.git
synced 2024-11-15 20:31:16 +08:00
Add unsigned bind to postgresql (#395)
This commit is contained in:
parent
d17bce9644
commit
e7590dc004
@ -100,6 +100,7 @@ namespace sqlpp
|
|||||||
void _bind_boolean_result(size_t index, signed char* value, bool* is_null);
|
void _bind_boolean_result(size_t index, signed char* value, bool* is_null);
|
||||||
void _bind_floating_point_result(size_t index, double* value, bool* is_null);
|
void _bind_floating_point_result(size_t index, double* value, bool* is_null);
|
||||||
void _bind_integral_result(size_t index, int64_t* value, bool* is_null);
|
void _bind_integral_result(size_t index, int64_t* value, bool* is_null);
|
||||||
|
void _bind_unsigned_integral_result(size_t index, uint64_t* value, bool* is_null);
|
||||||
void _bind_text_result(size_t index, const char** value, size_t* len);
|
void _bind_text_result(size_t index, const char** value, size_t* len);
|
||||||
void _bind_date_result(size_t index, ::sqlpp::chrono::day_point* value, bool* is_null);
|
void _bind_date_result(size_t index, ::sqlpp::chrono::day_point* value, bool* is_null);
|
||||||
void _bind_date_time_result(size_t index, ::sqlpp::chrono::microsecond_point* value, bool* is_null);
|
void _bind_date_time_result(size_t index, ::sqlpp::chrono::microsecond_point* value, bool* is_null);
|
||||||
@ -190,6 +191,18 @@ namespace sqlpp
|
|||||||
*value = _handle->result.getValue<unsigned long long>(_handle->count, index);
|
*value = _handle->result.getValue<unsigned long long>(_handle->count, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void bind_result_t::_bind_unsigned_integral_result(size_t _index, uint64_t* value, bool* is_null)
|
||||||
|
{
|
||||||
|
auto index = static_cast<int>(_index);
|
||||||
|
if (_handle->debug())
|
||||||
|
{
|
||||||
|
std::cerr << "PostgreSQL debug: binding unsigned integral result at index: " << index << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
*is_null = _handle->result.isNull(_handle->count, index);
|
||||||
|
*value = _handle->result.getValue<unsigned long long>(_handle->count, index);
|
||||||
|
}
|
||||||
|
|
||||||
inline void bind_result_t::_bind_text_result(size_t _index, const char** value, size_t* len)
|
inline void bind_result_t::_bind_text_result(size_t _index, const char** value, size_t* len)
|
||||||
{
|
{
|
||||||
auto index = static_cast<int>(_index);
|
auto index = static_cast<int>(_index);
|
||||||
|
Loading…
Reference in New Issue
Block a user