whereIs function
Creates a filter for boolean condition searches.
type
: The property to filter by, either a String or a Function.
value
: The boolean value to compare the property against.
Returns a CoffeeQueryFilter configured for boolean condition searches.
Usage Example
whereIs('isValid', true)
whereIs((Model model) => model.isValid, false)
Implementation
CoffeeQueryFilter whereIs(dynamic type, bool value) {
final propertyName = _getPropertyName(type);
return CoffeeQueryFilter(
expression: '$propertyName==$value',
type: 'filter',
);
}