QueryPredicate class Null safety

A predicate contains instructions for filtering rows when performing a Query.

Predicates currently are the WHERE clause in a SQL statement and are used verbatim by the PersistentStore. In general, you should use Query.where instead of using this class directly, as Query.where will use the underlying PersistentStore to generate a QueryPredicate for you.

A predicate has a format and parameters. The format is the String that comes after WHERE in a SQL query. The format may have parameterized values, for which the corresponding value is in the parameters map. A parameter is prefixed with '@' in the format string. Currently, the format string's parameter syntax is defined by the PersistentStore it is used on. An example of that format:

var predicate = new QueryPredicate("x = @xValue", {"xValue" : 5});

Constructors

QueryPredicate(String format, Map<String, dynamic>? parameters)
Default constructor
QueryPredicate.and(Iterable<QueryPredicate?>? predicates)
Combines predicates with 'AND' keyword.
factory
QueryPredicate.empty()
Creates an empty predicate.

Properties

format String
The string format of the this predicate.
read / write
hashCode int
The hash code for this object.
read-onlyinherited
parameters Map<String, dynamic>?
A map of values to replace in the format string at execution time.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited