Function mz_sql::query_model::validator::quantifier::check_constraints
source · fn check_constraints<'a, const N: usize>(
constraints: &[QuantifierConstraint; N],
quantifiers: impl Iterator<Item = BoundRef<'a, Quantifier>>,
model: &'a Model,
on_failure: impl FnMut(&QuantifierConstraint)
)
Expand description
Check a const-sized array of constraints
against a sequence of quantifiers
,
and call on_failure
for constraints that are not satisfied by the sequence.
A constraint[i]
is violated iff one of the following conditions are met:
- The number of
quantifiers
with satisfied type is within the given range. - All
quantifiers
with satisfied type also satisfy the quantifier box constraints.