whereIn function
Creates a filter for inclusion searches.
type
: The property to filter by, either a String or a Function.
values
: The list of values that the property should be within.
Returns a CoffeeQueryFilter configured for inclusion searches.
Usage Example
whereIn('id', [1, 2, 3])
whereIn((Model model) => model.id, [4, 5, 6])
Implementation
CoffeeQueryFilter whereIn(dynamic type, List<dynamic> values) {
final propertyName = _getPropertyName(type);
const operator = '@IN@';
final value = values.join("||");
return CoffeeQueryFilter(
expression: '$propertyName$operator$value',
type: 'filter',
);
}