Class QueryResultHandle

java.lang.Object
com.couchbase.analytics.client.java.QueryResultHandle
All Implemented Interfaces:
RowSource

@ThreadSafe public class QueryResultHandle extends Object
A handle for the result of a completed query.
See Also:
  • Method Details

    • ordered

      public boolean ordered()
    • partitions

      @Experimental public List<PartitionHandle> partitions()
    • discard

      public void discard()
    • rowCount

      public long rowCount()
      Description copied from interface: RowSource
      Returns the number of result rows.
      Specified by:
      rowCount in interface RowSource
    • streamRows

      public QueryMetadata streamRows(Consumer<Row> rowAction, Consumer<RowOptions> options)
      Description copied from interface: RowSource
      Fetches result rows and passes them to the given rowAction callback, one by one as they arrive from the server.

      The callback action is guaranteed to execute in the same thread (or virtual thread) that called this method. If the callback throws an exception, the exception is re-thrown by this method.

      Prefer this over RowSource.bufferRows() when it's unknown whether the rows fit in memory.

      Specified by:
      streamRows in interface RowSource
      Parameters:
      options - A callback for specifying custom options.