Uses of Class
com.google.cloud.firestore.Query
Packages that use Query
-
Uses of Query in com.google.cloud.firestore
Subclasses of Query in com.google.cloud.firestoreModifier and TypeClassDescriptionclassA Collection Group query matches all documents that are contained in a collection or subcollection with a specific collection ID.classA CollectionReference can be used for adding documents, getting document references, and querying for documents (using the methods inherited from Query).Methods in com.google.cloud.firestore that return QueryModifier and TypeMethodDescriptionQueryPartition.createQuery()Returns a query that only returns the documents for this partition.Query.endAt(DocumentSnapshot snapshot) Creates and returns a new Query that ends at the provided document (inclusive).Creates and returns a new Query that ends at the provided fields relative to the order of the query.Query.endBefore(DocumentSnapshot snapshot) Creates and returns a new Query that ends before the provided document (exclusive).Creates and returns a new Query that ends before the provided fields relative to the order of the query.static QueryQuery.fromProto(Firestore firestore, RunQueryRequest proto) Returns a Query instance that can be used to execute the providedRunQueryRequest.AggregateQuery.getQuery()Returns the query whose aggregations will be calculated by this object.Query.limit(int limit) Creates and returns a new Query that only returns the first matching documents.Query.limitToLast(int limit) Creates and returns a new Query that only returns the last matching documents.Query.offset(int offset) Creates and returns a new Query that skips the first n results.Creates and returns a new Query that's additionally sorted by the specified field.Query.orderBy(FieldPath fieldPath, Query.Direction direction) Creates and returns a new Query that's additionally sorted by the specified field, optionally in descending order instead of ascending.Creates and returns a new Query that's additionally sorted by the specified field.Query.orderBy(String field, Query.Direction direction) Creates and returns a new Query that's additionally sorted by the specified field, optionally in descending order instead of ascending.Creates and returns a new Query instance that applies a field mask to the result and returns the specified subset of fields.Creates and returns a new Query instance that applies a field mask to the result and returns the specified subset of fields.Query.startAfter(DocumentSnapshot snapshot) Creates and returns a new Query that starts after the provided document (exclusive).Query.startAfter(Object... fieldValues) Creates and returns a new Query that starts after the provided fields relative to the order of the query.Query.startAt(DocumentSnapshot snapshot) Creates and returns a new Query that starts at the provided document (inclusive).Creates and returns a new Query that starts at the provided fields relative to the order of the query.Creates and returns a new Query with the additional filter.Query.whereArrayContains(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field, the value must be an array, and that the array must contain the provided value.Query.whereArrayContains(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field, the value must be an array, and that the array must contain the provided value.Query.whereArrayContainsAny(FieldPath fieldPath, List<? extends Object> values) Creates and returns a new Query with the additional filter that documents must contain the specified field, the value must be an array, and that the array must contain at least one value from the provided list.Query.whereArrayContainsAny(String field, List<? extends Object> values) Creates and returns a new Query with the additional filter that documents must contain the specified field, the value must be an array, and that the array must contain at least one value from the provided list.Query.whereEqualTo(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be equal to the specified value.Query.whereEqualTo(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be equal to the specified value.Query.whereGreaterThan(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be greater than the specified value.Query.whereGreaterThan(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be greater than the specified value.Query.whereGreaterThanOrEqualTo(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be greater than or equal to the specified value.Query.whereGreaterThanOrEqualTo(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be greater than or equal to the specified value.Creates and returns a new Query with the additional filter that documents must contain the specified field and the value must equal one of the values from the provided list.Creates and returns a new Query with the additional filter that documents must contain the specified field and the value must equal one of the values from the provided list.Query.whereLessThan(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less than the specified value.Query.whereLessThan(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less than the specified value.Query.whereLessThanOrEqualTo(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less or equal to the specified value.Query.whereLessThanOrEqualTo(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value should be less or equal to the specified value.Query.whereNotEqualTo(FieldPath fieldPath, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value does not equal the specified value.Query.whereNotEqualTo(String field, Object value) Creates and returns a new Query with the additional filter that documents must contain the specified field and its value does not equal the specified value.Query.whereNotIn(FieldPath fieldPath, List<? extends Object> values) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value does not equal any of the values from the provided list.Query.whereNotIn(String field, List<? extends Object> values) Creates and returns a new Query with the additional filter that documents must contain the specified field and the value does not equal any of the values from the provided list.Methods in com.google.cloud.firestore with parameters of type QueryModifier and TypeMethodDescriptionabstract com.google.api.core.ApiFuture<QuerySnapshot>Returns the result set from the provided query.static QuerySnapshotQuerySnapshot.withChanges(Query query, com.google.cloud.Timestamp readTime, com.google.cloud.firestore.DocumentSet documentSet, List<DocumentChange> documentChanges) Creates a new QuerySnapshot representing a snapshot of a Query with changed documents.static QuerySnapshotQuerySnapshot.withDocuments(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents) Creates a new QuerySnapshot representing the results of a Query with added documents.Constructors in com.google.cloud.firestore with parameters of type QueryModifierConstructorDescriptionQueryPartition(Query query, Object[] startAt, Object[] endBefore) protectedQuerySnapshot(Query query, com.google.cloud.Timestamp readTime) protectedQuerySnapshot(Query query, com.google.cloud.Timestamp readTime, List<QueryDocumentSnapshot> documents, List<DocumentChange> documentChanges)