Class StreamableQuery<SnapshotType>

java.lang.Object
com.google.cloud.firestore.StreamableQuery<SnapshotType>
Direct Known Subclasses:
Query, VectorQuery

public abstract class StreamableQuery<SnapshotType> extends Object
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 Details

    • getFirestore

      @Nonnull public Firestore getFirestore()
      Gets the Firestore instance associated with this query.
      Returns:
      The Firestore instance associated with this query.
    • get

      @Nonnull public abstract com.google.api.core.ApiFuture<SnapshotType> 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)