Query extension type

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.

on
Implemented types
Implementers
Available extensions

Properties

firestore Firestore
The Firestore for the Firestore database (useful for performing transactions, etc.).
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

aggregate(JSObject aggregateSpec) AggregateQuery
Returns a query that can perform the given aggregations.
count() AggregateQuery
Returns a query that counts the documents in the result set of this query.
endAt(DocumentSnapshot snapshot) Query
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.
endBefore(DocumentSnapshot snapshot) Query
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.
explain(ExplainOptions options) JSPromise<ExplainResults<QuerySnapshot>>
Plans and optionally executes this query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
findNearest(JSAny vectorField, JSObject queryVector, JSObject options) VectorQuery
Returns a query that can perform vector distance (similarity) search with given parameters.
get() JSPromise<QuerySnapshot>
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.
isEqual(Query other) bool
Returns true if this Query is equal to the provided one.
limit(int limit) Query
Creates and returns a new Query that only returns the first matching documents.
limitToLast(int limit) Query
Creates and returns a new Query that only returns the last matching documents.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offset(int offset) Query
Specifies the offset of the returned results.
onSnapshot(JSFunction onNext, [JSFunction onError]) → void
Executes the query and returns the results as Node Stream.
orderBy(JSAny fieldPath, [String directionStr]) Query
Creates and returns a new Query that's additionally sorted by the specified field, optionally in descending order instead of ascending.
startAfter(DocumentSnapshot snapshot) Query
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.
startAt(DocumentSnapshot snapshot) Query
Creates and returns a new Query instance that applies a field mask to the result and returns only the specified subset of fields. You can specify a list of field paths to return, or use an empty list to only return the references of matching documents.
toString() String
A string representation of this object.
inherited
where(Filter filter) Query
Creates and returns a new Query{@link Query} with the additional filter that documents should satisfy the relation constraint provided. Documents must contain the field specified in the filter.
whereFieldPath(JSAny fieldPath, String opStr, JSAny value) Query
Creates and returns a new Query with the additional filter that documents must contain the specified field and that its value should satisfy the relation constraint provided.
withConverter(FirestoreDataConverter? converter) Query
Applies a custom data converter to this Query, allowing you to use your own custom model objects with Firestore. When you call get() on the returned Query, the provided converter will convert between Firestore data of type NewDbModelType and your custom type NewAppModelType.

Operators

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