QueryBuilder<OBJ, R, S> class
Query builders are used to create queries in a safe way.
Acquire a QueryBuilder
instance using collection.where()
or
collection.filter()
.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allOf<
E> (Iterable< E> items, FilterRepeatModifier<OBJ, OBJ, E> modifier) → QueryBuilder<OBJ, R, QAfterFilterCondition> -
Available on QueryBuilder<
Joins the results of theOBJ, R, QFilterCondition> , provided by the QueryFilterNotAnyAll extensionmodifier
for each item initems
using logical AND. So an object will be included if it matches all of the resulting filters. -
and(
) → QueryBuilder< OBJ, R, QFilterCondition> -
Available on QueryBuilder<
Intersection of two filter conditions.OBJ, R, QFilterOperator> , provided by the QueryFilterAndOr extension -
anyOf<
E> (Iterable< E> items, FilterRepeatModifier<OBJ, OBJ, E> modifier) → QueryBuilder<OBJ, R, QAfterFilterCondition> -
Available on QueryBuilder<
Joins the results of theOBJ, R, QFilterCondition> , provided by the QueryFilterNotAnyAll extensionmodifier
for each item initems
using logical OR. So an object will be included if it matches at least one of the resulting filters. -
average(
) → double -
Available on QueryBuilder<
Calculates the average of all values. This only works for numeric values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
averageAsync(
) → Future< double> -
Available on QueryBuilder<
Calculates the average of all values. This only works for numeric values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
build(
) → DatabaseUniverseQuery< R> -
Available on QueryBuilder<
Create a query from this query builder.OBJ, R, QOperations> , provided by the QueryExecute extension -
count(
) → int -
Available on QueryBuilder<
Count how many objects match the query.OBJ, R, QOperations> , provided by the QueryExecute extension -
countAsync(
) → Future< int> -
Available on QueryBuilder<
Count how many objects match the query.OBJ, R, QOperations> , provided by the QueryExecute extension -
deleteAll(
{int? offset, int? limit}) → int -
Available on QueryBuilder<
Delete all objects that match this query. Returns the number of deleted objects.OBJ, R, QOperations> , provided by the QueryExecute extension -
deleteFirst(
{int? offset}) → bool -
Available on QueryBuilder<
Delete the first object that matches this query. Returns whether an object has been deleted.OBJ, R, QOperations> , provided by the QueryExecute extension -
exportJson(
{int? offset, int? limit}) → List< Map< String, dynamic> > -
Available on QueryBuilder<
Export the results of this query as json.OBJ, R, QOperations> , provided by the QueryExecute extension -
findAll(
{int? offset, int? limit}) → List< R> -
Available on QueryBuilder<
Find all objects that match this query.OBJ, R, QOperations> , provided by the QueryExecute extension -
findAllAsync(
{int? offset, int? limit}) → Future< List< R> > -
Available on QueryBuilder<
Find all objects that match this query.OBJ, R, QOperations> , provided by the QueryExecute extension -
findFirst(
{int? offset}) → R? -
Available on QueryBuilder<
Find the first object that matches this query orOBJ, R, QOperations> , provided by the QueryExecute extensionnull
if no object matches. -
findFirstAsync(
{int? offset}) → Future< R?> -
Available on QueryBuilder<
Find the first object that matches this query orOBJ, R, QOperations> , provided by the QueryExecute extensionnull
if no object matches. -
group(
FilterQuery< OBJ> q) → QueryBuilder<OBJ, R, QAfterFilterCondition> -
Available on QueryBuilder<
Group filter conditions.OBJ, R, QFilterCondition> , provided by the QueryFilterNotAnyAll extension -
isEmpty(
) → bool -
Available on QueryBuilder<
YieldsOBJ, R, QOperations> , provided by the QueryExecute extensiontrue
if there are no objects that match the query. -
isEmptyAsync(
) → Future< bool> -
Available on QueryBuilder<
YieldsOBJ, R, QOperations> , provided by the QueryExecute extensiontrue
if there are no objects that match the query. -
max(
) → DateTime? -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, DateTime?, QAfterProperty> , provided by the QueryExecuteDateAggregation extension -
max(
) → String? -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, String?, QAfterProperty> , provided by the QueryExecuteStringAggregation extension -
max(
) → T? -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
maxAsync(
) → Future< T?> -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
maxAsync(
) → Future< String?> -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, String?, QAfterProperty> , provided by the QueryExecuteStringAggregation extension -
maxAsync(
) → Future< DateTime?> -
Available on QueryBuilder<
Finds the largest value matching the query.OBJ, DateTime?, QAfterProperty> , provided by the QueryExecuteDateAggregation extension -
min(
) → T? -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
min(
) → String? -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, String?, QAfterProperty> , provided by the QueryExecuteStringAggregation extension -
min(
) → DateTime? -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, DateTime?, QAfterProperty> , provided by the QueryExecuteDateAggregation extension -
minAsync(
) → Future< T?> -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
minAsync(
) → Future< DateTime?> -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, DateTime?, QAfterProperty> , provided by the QueryExecuteDateAggregation extension -
minAsync(
) → Future< String?> -
Available on QueryBuilder<
Finds the smallest value matching the query. Null values are considered smaller than all other values.OBJ, String?, QAfterProperty> , provided by the QueryExecuteStringAggregation extension -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → QueryBuilder< OBJ, R, QFilterCondition> -
Available on QueryBuilder<
Complement the next filter condition or group.OBJ, R, QFilterCondition> , provided by the QueryFilterNotAnyAll extension -
optional<
RS> (bool enabled, QueryOption< OBJ, S, RS> option) → QueryBuilder<OBJ, OBJ, RS> -
Available on QueryBuilder<
Only apply a part of the query ifOBJ, OBJ, S> , provided by the QueryModifier extensionenabled
is true. -
or(
) → QueryBuilder< OBJ, R, QFilterCondition> -
Available on QueryBuilder<
Union of two filter conditions.OBJ, R, QFilterOperator> , provided by the QueryFilterAndOr extension -
sum(
) → T -
Available on QueryBuilder<
Calculates the sum of all values. This only works for numeric values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
sumAsync(
) → Future< T> -
Available on QueryBuilder<
Calculates the sum of all values. This only works for numeric values.OBJ, T?, QAfterProperty> , provided by the QueryExecuteNumAggregation extension -
toString(
) → String -
A string representation of this object.
inherited
-
watch(
{bool fireImmediately = false, int? offset, int? limit}) → Stream< List< R> > -
Available on QueryBuilder<
Create a watcher that yields the results of this query whenever its results have (potentially) changed.OBJ, R, QOperations> , provided by the QueryExecute extension -
watchLazy(
{bool fireImmediately = false}) → Stream< void> -
Available on QueryBuilder<
Watch the query for changes. IfOBJ, R, QOperations> , provided by the QueryExecute extensionfireImmediately
istrue
, an event will be fired immediately.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited