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 JsonObjectdebug()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 oneAsyncViewRowfor each row received from the view.booleansuccess()If the query was successful.inttotalRows()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:AsyncViewResultEmits oneAsyncViewRowfor each row received from the view.- Specified by:
rowsin interfaceAsyncViewResult- Returns:
- a (potentially empty)
Observablecontaining view rows.
-
totalRows
public int totalRows()
Description copied from interface:AsyncViewResultThe total number of rows.- Specified by:
totalRowsin interfaceAsyncViewResult- Returns:
- number of rows.
-
success
public boolean success()
Description copied from interface:AsyncViewResultIf the query was successful.- Specified by:
successin interfaceAsyncViewResult- Returns:
- true if it was, false otherwise.
-
error
public rx.Observable<JsonObject> error()
Description copied from interface:AsyncViewResultIf it was not successful, an error is contained here.- Specified by:
errorin interfaceAsyncViewResult- Returns:
- the potential error.
-
debug
public JsonObject debug()
Description copied from interface:AsyncViewResultIf debug was enabled on the query, it is contained here.- Specified by:
debugin interfaceAsyncViewResult- Returns:
- the debug info.
-
-