database.filter library

Filter classes for complex database queries.

import 'package:database/database.dart';
import 'package:database/filter.dart';

Future<List<Recipe>> findGoodItalianRecipes(Collection<Recipe> recipes) {
  return recipes.query(
    query: Query(
      filter: MapFilter({
        'rating': RangeFilter(min: 3.0),
        'cuisine': ValueFilter('Italian'),
      }),
      take: 10,
    ),
  ).toList();
}

Classes

AndFilter
Logical AND. [...]
Filter
Describes how to score possible matches. Used by Query.
FilterVisitor<T, C>
Visits Filter trees.
GeneralizingFilterVisitor<T, C>
Visits Filter trees. Every visitor method has a default implementation that calls visitFilter.
GeoPointFilter
A Filter that matches GeoPoint values near a specified location. [...]
KeywordFilter
A natural language search query. The exact semantics are intentionally unspecified. [...]
ListFilter
A filter for lists. [...]
MapFilter
A filter for maps. [...]
NotFilter
Logical NOT.
OrFilter
Logical OR. [...]
RangeFilter
Defines minimum and maximum value. [...]
RegExpFilter
A regular expression matching filter. [...]
SqlFilter
A filter that contains an SQL query. [...]
ValueFilter
Defines exact value.