Package com.google.cloud.firestore
Class StreamableQuery<SnapshotType>
java.lang.Object
com.google.cloud.firestore.StreamableQuery<SnapshotType>
- Direct Known Subclasses:
Query,VectorQuery
Represents a query whose results can be streamed. If the stream fails with a retryable error,
implementations of StreamableQuery can optionally support retries with a cursor, as indicated by
`isRetryableWithCursor`. Retrying with a cursor means that the StreamableQuery can be resumed
where it failed by first calling `startAfter(lastDocumentReceived)`.
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.api.core.ApiFuture<ExplainResults<SnapshotType>>explain(ExplainOptions options) Plans and optionally executes this query.abstract com.google.api.core.ApiFuture<SnapshotType>get()Executes the query and returns the results as QuerySnapshot.Gets the Firestore instance associated with this query.protected voidinternalStream(com.google.api.gax.rpc.ApiStreamObserver<RunQueryResponse> runQueryResponseObserver, long startTimeNanos, com.google.protobuf.ByteString transactionId, com.google.cloud.Timestamp readTime, ExplainOptions explainOptions, boolean isRetryRequestWithCursor)
-
Method Details
-
getFirestore
Gets the Firestore instance associated with this query.- Returns:
- The Firestore instance associated with this query.
-
get
Executes the query and returns the results as QuerySnapshot.- Returns:
- An ApiFuture that will be resolved with the results of the Query.
-
explain
@Nonnull public com.google.api.core.ApiFuture<ExplainResults<SnapshotType>> explain(ExplainOptions options) Plans and optionally executes this query. Returns an ApiFuture that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).- Returns:
- An ApiFuture that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
-
internalStream
protected void internalStream(com.google.api.gax.rpc.ApiStreamObserver<RunQueryResponse> runQueryResponseObserver, long startTimeNanos, @Nullable com.google.protobuf.ByteString transactionId, @Nullable com.google.cloud.Timestamp readTime, @Nullable ExplainOptions explainOptions, boolean isRetryRequestWithCursor)
-