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().

Available extensions

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<OBJ, R, QFilterCondition>, provided by the QueryFilterNotAnyAll extension

Joins the results of the modifier for each item in items 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<OBJ, R, QFilterOperator>, provided by the QueryFilterAndOr extension

Intersection of two filter conditions.
anyOf<E>(Iterable<E> items, FilterRepeatModifier<OBJ, OBJ, E> modifier) QueryBuilder<OBJ, R, QAfterFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterCondition>, provided by the QueryFilterNotAnyAll extension

Joins the results of the modifier for each item in items using logical OR. So an object will be included if it matches at least one of the resulting filters.
average() double

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Calculates the average of all values. This only works for numeric values.
averageAsync() Future<double>

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Calculates the average of all values. This only works for numeric values.
build() DatabaseUniverseQuery<R>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Create a query from this query builder.
count() int

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Count how many objects match the query.
countAsync() Future<int>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Count how many objects match the query.
deleteAll({int? offset, int? limit}) int

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Delete all objects that match this query. Returns the number of deleted objects.
deleteFirst({int? offset}) bool

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Delete the first object that matches this query. Returns whether an object has been deleted.
exportJson({int? offset, int? limit}) List<Map<String, dynamic>>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Export the results of this query as json.
findAll({int? offset, int? limit}) List<R>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Find all objects that match this query.
findAllAsync({int? offset, int? limit}) Future<List<R>>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Find all objects that match this query.
findFirst({int? offset}) → R?

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Find the first object that matches this query or null if no object matches.
findFirstAsync({int? offset}) Future<R?>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Find the first object that matches this query or null if no object matches.
group(FilterQuery<OBJ> q) QueryBuilder<OBJ, R, QAfterFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterCondition>, provided by the QueryFilterNotAnyAll extension

Group filter conditions.
isEmpty() bool

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Yields true if there are no objects that match the query.
isEmptyAsync() Future<bool>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Yields true if there are no objects that match the query.
max() DateTime?

Available on QueryBuilder<OBJ, DateTime?, QAfterProperty>, provided by the QueryExecuteDateAggregation extension

Finds the largest value matching the query.
max() String?

Available on QueryBuilder<OBJ, String?, QAfterProperty>, provided by the QueryExecuteStringAggregation extension

Finds the largest value matching the query.
max() → T?

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Finds the largest value matching the query.
maxAsync() Future<T?>

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Finds the largest value matching the query.
maxAsync() Future<String?>

Available on QueryBuilder<OBJ, String?, QAfterProperty>, provided by the QueryExecuteStringAggregation extension

Finds the largest value matching the query.
maxAsync() Future<DateTime?>

Available on QueryBuilder<OBJ, DateTime?, QAfterProperty>, provided by the QueryExecuteDateAggregation extension

Finds the largest value matching the query.
min() → T?

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
min() String?

Available on QueryBuilder<OBJ, String?, QAfterProperty>, provided by the QueryExecuteStringAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
min() DateTime?

Available on QueryBuilder<OBJ, DateTime?, QAfterProperty>, provided by the QueryExecuteDateAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
minAsync() Future<T?>

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
minAsync() Future<DateTime?>

Available on QueryBuilder<OBJ, DateTime?, QAfterProperty>, provided by the QueryExecuteDateAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
minAsync() Future<String?>

Available on QueryBuilder<OBJ, String?, QAfterProperty>, provided by the QueryExecuteStringAggregation extension

Finds the smallest value matching the query. Null values are considered smaller than all other values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() QueryBuilder<OBJ, R, QFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterCondition>, provided by the QueryFilterNotAnyAll extension

Complement the next filter condition or group.
optional<RS>(bool enabled, QueryOption<OBJ, S, RS> option) QueryBuilder<OBJ, OBJ, RS>

Available on QueryBuilder<OBJ, OBJ, S>, provided by the QueryModifier extension

Only apply a part of the query if enabled is true.
or() QueryBuilder<OBJ, R, QFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterOperator>, provided by the QueryFilterAndOr extension

Union of two filter conditions.
sum() → T

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Calculates the sum of all values. This only works for numeric values.
sumAsync() Future<T>

Available on QueryBuilder<OBJ, T?, QAfterProperty>, provided by the QueryExecuteNumAggregation extension

Calculates the sum of all values. This only works for numeric values.
toString() String
A string representation of this object.
inherited
watch({bool fireImmediately = false, int? offset, int? limit}) Stream<List<R>>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Create a watcher that yields the results of this query whenever its results have (potentially) changed.
watchLazy({bool fireImmediately = false}) Stream<void>

Available on QueryBuilder<OBJ, R, QOperations>, provided by the QueryExecute extension

Watch the query for changes. If fireImmediately is true, an event will be fired immediately.

Operators

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