[Qt] Make datatypes compatible with the default implementation
On the default all integers map to `sqlite3_bind_int64`.
This commit is contained in:
committed by
Thiago Marcos P. Santos
parent
68440ee6c2
commit
a8225b8fff
@@ -189,10 +189,7 @@ Statement::operator bool() const {
|
||||
return impl.operator bool();
|
||||
}
|
||||
|
||||
template void Statement::bind(int, int8_t);
|
||||
template void Statement::bind(int, int32_t);
|
||||
template void Statement::bind(int, int64_t);
|
||||
template void Statement::bind(int, uint8_t);
|
||||
|
||||
template <typename T>
|
||||
void Statement::bind(int offset, T value) {
|
||||
@@ -210,11 +207,26 @@ void Statement::bind(int offset, std::nullptr_t) {
|
||||
checkQueryError(impl->query);
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, int32_t value) {
|
||||
bind(offset, static_cast<int64_t>(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, bool value) {
|
||||
bind(offset, static_cast<int>(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, int8_t value) {
|
||||
bind(offset, static_cast<int64_t>(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, uint8_t value) {
|
||||
bind(offset, static_cast<int64_t>(value));
|
||||
}
|
||||
|
||||
template <>
|
||||
void Statement::bind(int offset, mbgl::Timestamp value) {
|
||||
bind(offset, std::chrono::system_clock::to_time_t(value));
|
||||
|
||||
Reference in New Issue
Block a user