Where class

Inheritance
Implementers

Constructors

Where(String evaluatedField, {dynamic value, Compare compare, bool required})
A condition that evaluates to true in the Provider should return Model. [...]
const
Where.exact(String evaluatedField, dynamic value, {bool required: true})
A condition written with brevity. required defaults true.
factory

Properties

compare Compare
The kind of comparison of the evaluatedField to the value. Defaults to Compare.equals. It is the responsibility of the Provider to ignore or interpret the requested comparison.
final
conditions List<WhereCondition>
Nested conditions. Leave unchanged for WhereConditions that do not nest.
final, inherited
evaluatedField String
The Dart name of the field. For example, myField when querying final String myField. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
required bool
Whether the condition(s) must evaluate to true. Defaults true. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value → dynamic
The value to compare on the evaluatedField.
final

Methods

contains(dynamic value) Where
doesNotContain(dynamic value) Where
isBetween(dynamic value1, dynamic value2) Where
isExactly(dynamic value) Where
isGreaterThan(dynamic value) Where
isGreaterThanOrEqualTo(dynamic value) Where
isLessThan(dynamic value) Where
isLessThanOrEqualTo(dynamic value) Where
isNot(dynamic value) Where
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Methods

byField(String fieldName, List<WhereCondition> conditions) List<WhereCondition>
Recursively find conditions that evaluate a specific field. A field is a member on a model, such as myUserId in final String myUserId. If the use case for the field only requires one result, say id or primaryKey, firstByField may be more useful.
firstByField(String fieldName, List<WhereCondition> conditions) Where
Find the first occurrance of a condition that evaluates a specific field For all conditions, use byField.

Constants

defaults → const Where
const Where('', compare: Compare.exact, required: true)