Query class

An interface to request data from a Provider or Repository.

Constructors

Query({QueryAction? action, Map<String, dynamic>? providerArgs, List<WhereCondition>? where})
Query.fromJson(Map<String, dynamic> json)
factory
Query.where(String evaluatedField, dynamic value, {Compare? compare, bool limit1 = false})
Make a very simple query with a single Where statement. For example Query.where('id', 1).
factory

Properties

action QueryAction?
How this query interacts with its invoking provider.
final
hashCode int
The hash code for this object.
no setteroverride
providerArgs Map<String, dynamic>
Properties that interact with the provider's source. For example, 'limit'. The value must be serializable by jsonEncode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unlimited bool
no setter
where List<WhereCondition>?
Model properties to be interpreted by the Provider. When creating WhereConditions, the first positional fieldName argument should be the field name, not the name used between the provider and source (e.g. data['last_name']).
final

Methods

copyWith({QueryAction? action, Map<String, dynamic>? providerArgs, List<WhereCondition>? where}) Query
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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