diff --git a/include/objectbox.hpp b/include/objectbox.hpp index 141f335..cb65254 100644 --- a/include/objectbox.hpp +++ b/include/objectbox.hpp @@ -1694,6 +1694,36 @@ class Property : public PropertyTypeless { return notIn(std::vector(values)); } + template > + QCInt64Array in(std::vector&& values) const { + static_assert(sizeof(obx_id) == sizeof(int64_t), "obx_id must have the same size as int64_t"); + std::vector valuesSigned(values.size()); + std::copy(values.begin(), values.end(), valuesSigned.begin()); + return in(std::move(valuesSigned)); + } + + template > + QCInt64Array in(const std::vector& values) const { + return in(std::vector(values)); + } + + template > + QCInt64Array notIn(std::vector&& values) const { + static_assert(sizeof(obx_id) == sizeof(int64_t), "obx_id must have the same size as int64_t"); + std::vector valuesSigned(values.size()); + std::copy(values.begin(), values.end(), valuesSigned.begin()); + return notIn(std::move(valuesSigned)); + } + + template > + QCInt64Array notIn(const std::vector& values) const { + return notIn(std::vector(values)); + } + template > QCDouble lessThan(double value) const { return {this->id_, QueryOp::Less, value}; @@ -2470,6 +2500,16 @@ class Query : public QueryBase { return *this; } + /// Change previously set condition value in an existing query - this improves reusability of the query object. + template > + Query& setParameter(Property property, const std::vector& values) { + static_assert(sizeof(obx_id) == sizeof(int64_t), "obx_id must have the same size as int64_t"); + std::vector valuesSigned(values.size()); + std::copy(values.begin(), values.end(), valuesSigned.begin()); + return setParameter(property, valuesSigned); + } + /// Change previously set condition value in an existing query - this improves reusability of the query object. template >