whereNotIn function

CoffeeQueryFilter whereNotIn(
  1. dynamic type,
  2. List values
)

Creates a filter for exclusion searches.

type: The property to filter by, either a String or a Function. values: The list of values that the property should not be within.

Returns a CoffeeQueryFilter configured for exclusion searches.

Usage Example

whereNotIn('id', [1, 2, 3])
whereNotIn((Model model) => model.id, [4, 5, 6])

Implementation

CoffeeQueryFilter whereNotIn(dynamic type, List<dynamic> values) {
  final propertyName = _getPropertyName(type);
  const operator = '@NOTIN@';
  final value = values.join("||");
  return CoffeeQueryFilter(
    expression: '$propertyName$operator$value',
    type: 'filter',
  );
}