@InterfaceStability.Committed @InterfaceAudience.Public public interface ViewResult extends Iterable<ViewRow>
ViewQuery
.Modifier and Type | Method and Description |
---|---|
List<ViewRow> |
allRows()
Collects all rows received from the view with the default view timeout.
|
List<ViewRow> |
allRows(long timeout,
TimeUnit timeUnit)
Collects all rows received from the view with the default view timeout.
|
JsonObject |
debug()
If debug was enabled on the query, it is contained here.
|
JsonObject |
error()
If it was not successful, an error is contained here.
|
JsonObject |
error(long timeout,
TimeUnit timeUnit)
If it was not successful, an error is contained here.
|
Iterator<ViewRow> |
rows()
Emits one
ViewRow for each row received from the view with the default view timeout. |
Iterator<ViewRow> |
rows(long timeout,
TimeUnit timeUnit)
Emits one
ViewRow for each row received from the view with a custom timeout. |
boolean |
success()
If the query was successful.
|
int |
totalRows()
The total number of rows.
|
forEach, iterator, spliterator
List<ViewRow> allRows()
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.List
containing view rows.List<ViewRow> allRows(long timeout, TimeUnit timeUnit)
TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.List
containing view rows.Iterator<ViewRow> rows()
ViewRow
for each row received from the view with the default view timeout.
This method throws:
- TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.Iterator
containing view rows.Iterator<ViewRow> rows(long timeout, TimeUnit timeUnit)
ViewRow
for each row received from the view with a custom timeout.
This method throws:
- TimeoutException
wrapped in a RuntimeException
: If the timeout is exceeded.timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.Iterator
containing view rows.int totalRows()
boolean success()
JsonObject error()
JsonObject error(long timeout, TimeUnit timeUnit)
JsonObject debug()
Copyright © 2015 Couchbase, Inc.