Query<T extends dynamic> class
A Query which you can read. You can also construct refined Query objects by adding filters and ordering.
This is the query of Firestore Lite: get is one request to the backend. There are no listeners and no cache.
- Implementers
Properties
-
converter
→ FirestoreDataConverter<
T> ? -
The converter applied to the documents this query returns, if any.
final
- firestore → FirebaseFirestore
-
The Firestore instance of this query.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
aggregate(
List< AggregateField> aggregateFields) → AggregateQuery - Returns an AggregateQuery that calculates the given aggregations over the result set of this query without downloading the documents.
-
aggregateWithAliases(
Map< String, AggregateField> aggregates) → AggregateQuery - Returns an AggregateQuery that calculates the given aggregations over the result set of this query, with results keyed by user-chosen aliases:
-
count(
) → AggregateQuery - Returns an AggregateQuery that counts the documents in the result set of this query without downloading them.
-
endAt(
Iterable< Object?> fieldValues) → Query<T> - Creates and returns a new Query that ends at the provided fields relative to the order of the query. The order of the field values must match the order of the order by clauses of the query.
-
endAtDocument(
DocumentSnapshot< Object?> snapshot) → Query<T> - Creates and returns a new Query that ends at the provided document (inclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
-
endBefore(
Iterable< Object?> fieldValues) → Query<T> - Creates and returns a new Query that ends before the provided fields relative to the order of the query. The order of the field values must match the order of the order by clauses of the query.
-
endBeforeDocument(
DocumentSnapshot< Object?> snapshot) → Query<T> - Creates and returns a new Query that ends before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
-
get(
) → Future< QuerySnapshot< T> > - Runs the query on the backend and returns the matching documents.
-
limit(
int limit) → Query< T> - Creates and returns a new Query that's additionally limited to only return up to the specified number of documents. This overrides a previous limitToLast.
-
limitToLast(
int limit) → Query< T> -
Creates and returns a new Query that only returns the last matching documents up to the specified number. This
overrides a previous
limit. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
orderBy(
Object field, {bool descending = false}) → Query< T> -
Creates and returns a new Query that's additionally sorted by
field, a String (dots separate nested fields) or a FieldPath, in ascending order or, withdescending, in descending order. -
startAfter(
Iterable< Object?> fieldValues) → Query<T> - Creates and returns a new Query that starts after the provided fields relative to the order of the query. The order of the field values must match the order of the order by clauses of the query.
-
startAfterDocument(
DocumentSnapshot< Object?> snapshot) → Query<T> - Creates and returns a new Query that starts after the provided document (exclusive). The starting position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
-
startAt(
Iterable< Object?> fieldValues) → Query<T> - Creates and returns a new Query that starts at the provided fields relative to the order of the query. The order of the field values must match the order of the order by clauses of the query.
-
startAtDocument(
DocumentSnapshot< Object?> snapshot) → Query<T> - Creates and returns a new Query that starts at the provided document (inclusive). The starting position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of this query.
-
toString(
) → String -
A string representation of this object.
override
-
where(
Object fieldOrFilter, {Object? isEqualTo, Object? isNotEqualTo, Object? isLessThan, Object? isLessThanOrEqualTo, Object? isGreaterThan, Object? isGreaterThanOrEqualTo, Object? arrayContains, Iterable< Object?> ? arrayContainsAny, Iterable<Object?> ? whereIn, Iterable<Object?> ? whereNotIn, bool? isNull}) → Query<T> - Creates and returns a new Query with additional filters.
-
withConverter<
U extends Object?> ({required FromFirestore< U> fromFirestore, required ToFirestore<U> toFirestore}) → Query<U> -
Returns the same query, returning objects of type
Umade byfromFirestore(and written withtoFirestore). -
withoutConverter(
) → Query< Map< String, Object?> > - Returns the same query without a converter.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override