Package com.couchbase.client.java.view
Interface SpatialViewResult
-
- All Superinterfaces:
Iterable<SpatialViewRow>
- All Known Implementing Classes:
DefaultSpatialViewResult
@Committed @Public public interface SpatialViewResult extends Iterable<SpatialViewRow>
Represents the result from aViewQuery
.- Since:
- 2.1.0
- Author:
- Michael Nitschinger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<SpatialViewRow>
allRows()
Collects all rows received from the view with the default view timeout.List<SpatialViewRow>
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<SpatialViewRow>
rows()
Emits oneViewRow
for each row received from the view with the default view timeout.Iterator<SpatialViewRow>
rows(long timeout, TimeUnit timeUnit)
Emits oneViewRow
for each row received from the view with a custom timeout.boolean
success()
If the query was successful.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
allRows
List<SpatialViewRow> allRows()
Collects all rows received from the view with the default view timeout. This method throws: -TimeoutException
wrapped in aRuntimeException
: If the timeout is exceeded.- Returns:
- a (potentially empty)
List
containing view rows.
-
allRows
List<SpatialViewRow> allRows(long timeout, TimeUnit timeUnit)
Collects all rows received from the view with the default view timeout. This method throws: -TimeoutException
wrapped in aRuntimeException
: If the timeout is exceeded.- Returns:
- a (potentially empty)
List
containing view rows.
-
rows
Iterator<SpatialViewRow> rows()
Emits oneViewRow
for each row received from the view with the default view timeout. This method throws: -TimeoutException
wrapped in aRuntimeException
: If the timeout is exceeded.- Returns:
- a (potentially empty)
Iterator
containing view rows.
-
rows
Iterator<SpatialViewRow> rows(long timeout, TimeUnit timeUnit)
Emits oneViewRow
for each row received from the view with a custom timeout. This method throws: -TimeoutException
wrapped in aRuntimeException
: If the timeout is exceeded.- Parameters:
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.- Returns:
- a (potentially empty)
Iterator
containing view rows.
-
success
boolean success()
If the query was successful.- Returns:
- true if it was, false otherwise.
-
error
JsonObject error()
If it was not successful, an error is contained here.- Returns:
- the potential error.
-
error
JsonObject error(long timeout, TimeUnit timeUnit)
If it was not successful, an error is contained here.- Returns:
- the potential error.
-
debug
JsonObject debug()
If debug was enabled on the query, it is contained here.- Returns:
- the debug info.
-
-