hasMatchAsMap method
Pass filters through data
and return true
if all conditions are met.
data
にfiltersを通し、条件にすべて当てはまる場合true
を返します。
Implementation
bool hasMatchAsMap(DynamicMap? data) {
if (data == null) {
return false;
}
for (final filter in filters) {
if (filter.type == ModelQueryFilterType.orderByAsc ||
filter.type == ModelQueryFilterType.orderByDesc ||
filter.type == ModelQueryFilterType.limit) {
continue;
}
if (filter.key.isEmpty) {
continue;
}
final val = data.containsKey(filter.key) ? data[filter.key] : null;
if (!filter._hasMatchValue(val)) {
return false;
}
}
return true;
}