SqlQuery: add BindDoubleOrNullValue() method
To facilitate serializing of the two DB fields added by the previous change.
This commit is contained in:
committed by
Jonas Kvinge
parent
0a4888f861
commit
73c56f038e
@@ -72,6 +72,12 @@ void SqlQuery::BindFloatValue(const QString &placeholder, const float value) {
|
||||
|
||||
}
|
||||
|
||||
void SqlQuery::BindDoubleOrNullValue(const QString &placeholder, const std::optional<double> value) {
|
||||
|
||||
BindValue(placeholder, value.has_value() ? *value : QVariant());
|
||||
|
||||
}
|
||||
|
||||
void SqlQuery::BindBoolValue(const QString &placeholder, const bool value) {
|
||||
|
||||
BindValue(placeholder, value ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user