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, RS>(Iterable<E> items, FilterRepeatModifier<OBJ, OBJ, E> modifier) QueryBuilder<OBJ, R, QAfterFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterCondition>, provided by the QueryFilterNot 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, RS>(Iterable<E> items, WhereRepeatModifier<OBJ, R, E> modifier) QueryBuilder<OBJ, R, QAfterWhereClause>

Available on QueryBuilder<OBJ, R, QWhereClause>, provided by the QueryWhere 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 where clauses.
anyOf<E, RS>(Iterable<E> items, FilterRepeatModifier<OBJ, OBJ, E> modifier) QueryBuilder<OBJ, R, QAfterFilterCondition>

Available on QueryBuilder<OBJ, R, QFilterCondition>, provided by the QueryFilterNot 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() Future<double>

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the average value of this query.
averageSync() double

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the average value of this query.
build() Query<R>

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

Create a query from this query builder.
count() Future<int>

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

Count how many objects match this query.
countSync() int

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

Count how many objects match this query.
deleteAll() Future<int>

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

Delete all objects that match this query. Returns the number of deleted objects.
deleteAllSync() int

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

Delete all objects that match this query. Returns the number of deleted objects.
deleteFirst() Future<bool>

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

Delete the first object that matches this query. Returns whether a object has been deleted.
deleteFirstSync() bool

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

Delete the first object that matches this query. Returns whether a object has been deleted.
exportJson() Future<List<Map<String, dynamic>>>

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

Export the results of this query as json.
exportJsonRaw<T>(T callback(Uint8List)) Future<T>

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

Export the results of this query as json bytes.
exportJsonRawSync<T>(T callback(Uint8List)) → T

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

Export the results of this query as json bytes.
exportJsonSync() List<Map<String, dynamic>>

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

Export the results of this query as json.
filter() QueryBuilder<OBJ, R, QFilterCondition>

Available on QueryBuilder<OBJ, R, QFilter>, provided by the QueryFilters extension

Start using filter conditions.
findAll() Future<List<R>>

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

Find all objects that match this query.
findAllSync() List<R>

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

Find all objects that match this query.
findFirst() Future<R?>

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

Find the first object that matches this query or null if no object matches.
findFirstSync() → R?

Available on QueryBuilder<OBJ, R, QQueryOperations>, 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 QueryFilterNoGroups extension

Group filter conditions.
isEmpty() Future<bool>

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

Returns true if there are no objects that match this query.
isEmptySync() bool

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

Returns true if there are no objects that match this query.
isNotEmpty() Future<bool>

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

Returns true if there are objects that match this query.
isNotEmptySync() bool

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

Returns true if there are objects that match this query.
limit(int limit) QueryBuilder<OBJ, R, QAfterLimit>

Available on QueryBuilder<OBJ, R, QLimit>, provided by the QueryLimit extension

Limit the maximum number of query results.
max() Future<T?>

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the maximum value of this query.
max() Future<DateTime?>

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

Returns the maximum value of this query.
maxSync() → T?

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the maximum value of this query.
maxSync() DateTime?

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

Returns the maximum value of this query.
min() Future<T?>

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the minimum value of this query.
min() Future<DateTime?>

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

Returns the minimum value of this query.
minSync() DateTime?

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

Returns the minimum value of this query.
minSync() → T?

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the minimum value of this query.
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 QueryFilterNot extension

Complement the next filter condition or group.
offset(int offset) QueryBuilder<OBJ, R, QAfterOffset>

Available on QueryBuilder<OBJ, R, QOffset>, provided by the QueryOffset extension

Offset the query results by a static number.
oneOf<E, RS>(Iterable<E> items, FilterRepeatModifier<OBJ, R, E> modifier) QueryBuilder<OBJ, R, QAfterFilterCondition>

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

Joins the results of the modifier for each item in items using logical XOR. So an object will be included if it matches exactly one of the resulting filters.
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.
or() QueryBuilder<OBJ, R, QWhereClause>

Available on QueryBuilder<OBJ, R, QWhereOr>, provided by the QueryWhereOr extension

Union of two where clauses.
sum() Future<T>

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the sum of all values of this query.
sumSync() → T

Available on QueryBuilder<OBJ, T?, QQueryOperations>, provided by the QueryExecuteAggregation extension

Returns the sum of all values of this query.
toString() String
A string representation of this object.
inherited
watch({bool fireImmediately = false}) Stream<List<R>>

Available on QueryBuilder<OBJ, R, QQueryOperations>, 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, QQueryOperations>, provided by the QueryExecute extension

Watch the query for changes. If fireImmediately is true, an event will be fired immediately.
xor() QueryBuilder<OBJ, R, QFilterCondition>

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

Logical XOR of two filter conditions.

Operators

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