Class QueryResultHandle
java.lang.Object
com.couchbase.analytics.client.java.QueryResultHandle
- All Implemented Interfaces:
RowSource
A handle for the result of a completed query.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoiddiscard()booleanordered()longrowCount()Returns the number of result rows.streamRows(Consumer<Row> rowAction, Consumer<RowOptions> options) Fetches result rows and passes them to the givenrowActioncallback, one by one as they arrive from the server.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.couchbase.analytics.client.java.RowSource
bufferRows, bufferRows, streamRows
-
Method Details
-
ordered
public boolean ordered() -
partitions
-
discard
public void discard() -
rowCount
public long rowCount()Description copied from interface:RowSourceReturns the number of result rows. -
streamRows
Description copied from interface:RowSourceFetches result rows and passes them to the givenrowActioncallback, 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:
streamRowsin interfaceRowSource- Parameters:
options- A callback for specifying custom options.
-