Package | Description |
---|---|
com.google.cloud.firestore |
Modifier and Type | Class and Description |
---|---|
class |
CollectionReference
A CollectionReference can be used for adding documents, getting document references, and querying
for documents (using the methods inherited from Query).
|
Modifier and Type | Method and Description |
---|---|
Query |
Firestore.collectionGroup(String collectionId)
Creates and returns a new @link{Query} that includes all documents in the database that are
contained in a collection or subcollection with the given @code{collectionId}.
|
Query |
Query.endAt(DocumentSnapshot snapshot)
Creates and returns a new Query that ends at the provided document (inclusive).
|
Query |
Query.endAt(Object... fieldValues)
Creates and returns a new Query that ends at the provided fields relative to the order of the
query.
|
Query |
Query.endBefore(DocumentSnapshot snapshot)
Creates and returns a new Query that ends before the provided document (exclusive).
|
Query |
Query.endBefore(Object... fieldValues)
Creates and returns a new Query that ends before the provided fields relative to the order of
the query.
|
Query |
QuerySnapshot.getQuery()
Returns the query for the snapshot.
|
Query |
Query.limit(int limit)
Creates and returns a new Query that's additionally limited to only return up to the specified
number of documents.
|
Query |
Query.offset(int offset)
Creates and returns a new Query that skips the first n results.
|
Query |
Query.orderBy(FieldPath fieldPath)
Creates and returns a new Query that's additionally sorted by the specified field.
|
Query |
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.
|
Query |
Query.orderBy(String field)
Creates and returns a new Query that's additionally sorted by the specified field.
|
Query |
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.
|
Query |
Query.select(FieldPath... fieldPaths)
Creates and returns a new Query instance that applies a field mask to the result and returns
the specified subset of fields.
|
Query |
Query.select(String... fields)
Creates and returns a new Query instance that applies a field mask to the result and returns
the specified subset of fields.
|
Query |
Query.startAfter(DocumentSnapshot snapshot)
Creates and returns a new Query that starts after the provided document (exclusive).
|
Query |
Query.startAfter(Object... fieldValues)
Creates and returns a new Query that starts after the provided fields relative to the order of
the query.
|
Query |
Query.startAt(DocumentSnapshot snapshot)
Creates and returns a new Query that starts at the provided document (inclusive).
|
Query |
Query.startAt(Object... fieldValues)
Creates and returns a new Query that starts at the provided fields relative to the order of the
query.
|
Query |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
|
Query |
Query.whereIn(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 must equal one of the values from the provided list.
|
Query |
Query.whereIn(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 must equal one of the values from the provided list.
|
Query |
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 |
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 |
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 |
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.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.core.ApiFuture<QuerySnapshot> |
Transaction.get(Query query)
Returns the result set from the provided query.
|
static QuerySnapshot |
QuerySnapshot.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 QuerySnapshot |
QuerySnapshot.withDocuments(Query query,
com.google.cloud.Timestamp readTime,
List<QueryDocumentSnapshot> documents)
Creates a new QuerySnapshot representing the results of a Query with added documents.
|
Constructor and Description |
---|
QuerySnapshot(Query query,
com.google.cloud.Timestamp readTime) |
Copyright © 2019 Google LLC. All rights reserved.