Package com.couchbase.client.java.view
Class DefaultAsyncViewResult
- java.lang.Object
-
- com.couchbase.client.java.view.DefaultAsyncViewResult
-
- All Implemented Interfaces:
AsyncViewResult
public class DefaultAsyncViewResult extends Object implements AsyncViewResult
-
-
Constructor Summary
Constructors Constructor Description DefaultAsyncViewResult(rx.Observable<AsyncViewRow> rows, int totalRows, boolean success, rx.Observable<JsonObject> error, JsonObject debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObject
debug()
If debug was enabled on the query, it is contained here.rx.Observable<JsonObject>
error()
If it was not successful, an error is contained here.rx.Observable<AsyncViewRow>
rows()
Emits oneAsyncViewRow
for each row received from the view.boolean
success()
If the query was successful.int
totalRows()
The total number of rows.
-
-
-
Constructor Detail
-
DefaultAsyncViewResult
public DefaultAsyncViewResult(rx.Observable<AsyncViewRow> rows, int totalRows, boolean success, rx.Observable<JsonObject> error, JsonObject debug)
-
-
Method Detail
-
rows
public rx.Observable<AsyncViewRow> rows()
Description copied from interface:AsyncViewResult
Emits oneAsyncViewRow
for each row received from the view.- Specified by:
rows
in interfaceAsyncViewResult
- Returns:
- a (potentially empty)
Observable
containing view rows.
-
totalRows
public int totalRows()
Description copied from interface:AsyncViewResult
The total number of rows.- Specified by:
totalRows
in interfaceAsyncViewResult
- Returns:
- number of rows.
-
success
public boolean success()
Description copied from interface:AsyncViewResult
If the query was successful.- Specified by:
success
in interfaceAsyncViewResult
- Returns:
- true if it was, false otherwise.
-
error
public rx.Observable<JsonObject> error()
Description copied from interface:AsyncViewResult
If it was not successful, an error is contained here.- Specified by:
error
in interfaceAsyncViewResult
- Returns:
- the potential error.
-
debug
public JsonObject debug()
Description copied from interface:AsyncViewResult
If debug was enabled on the query, it is contained here.- Specified by:
debug
in interfaceAsyncViewResult
- Returns:
- the debug info.
-
-