Query<T extends QueryJsImpl> class

A Query refers to a Query which you can read or listen to. You can also construct refined Query objects by adding filters and ordering.

See: firebase.google.com/docs/reference/js/firebase.firestore.Query.

Implementers

Constructors

Query.fromJsObject(T jsObject)
Creates a new Query from a jsObject.

Properties

firestore Firestore
Non-null Firestore for the Cloud Firestore database (useful for performing transactions, etc.).
no setter
hashCode int
The hash code for this object.
no setterinherited
jsObject → T
JS object.
finalinherited
onSnapshot Stream<QuerySnapshot>
Attaches a listener for QuerySnapshot events.
no setter
onSnapshotMetadata Stream<QuerySnapshot>
Attaches a listener for QuerySnapshot events.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

endAt({DocumentSnapshot? snapshot, List? fieldValues}) Query<QueryJsImpl>
Creates a new Query where the results end 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({DocumentSnapshot? snapshot, List? fieldValues}) Query<QueryJsImpl>
Creates a new Query where the results end 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>
Executes the query and returns the results as a QuerySnapshot.
limit(num limit) Query<QueryJsImpl>
Creates a new Query where the results are limited to the specified number of documents.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderBy(dynamic fieldPath, [String? directionStr]) Query<QueryJsImpl>
Creates a new Query where the results are sorted by the specified field, in descending or ascending order.
startAfter({DocumentSnapshot? snapshot, List? fieldValues}) Query<QueryJsImpl>
Creates a new Query where the results start 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({DocumentSnapshot? snapshot, List? fieldValues}) Query<QueryJsImpl>
Creates a new Query where the results start 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 the query.
toString() String
A string representation of this object.
inherited
where(dynamic fieldPath, String opStr, dynamic value) Query<QueryJsImpl>
Creates a new Query that returns only documents that include the specified fields and where the values satisfy the constraints provided.

Operators

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