@InterfaceStability.Committed @InterfaceAudience.Public public class DefaultAsyncN1qlQueryResult extends Object implements AsyncN1qlQueryResult
The default implementation of an AsyncN1qlQueryResult
.
Constructor and Description |
---|
DefaultAsyncN1qlQueryResult(Observable<AsyncN1qlQueryRow> rows,
Observable<Object> signature,
Observable<N1qlMetrics> info,
Observable<JsonObject> errors,
Observable<String> finalStatus,
boolean parsingSuccess,
String requestId,
String clientContextId) |
Modifier and Type | Method and Description |
---|---|
String |
clientContextId() |
Observable<JsonObject> |
errors() |
Observable<Boolean> |
finalSuccess()
Asynchronously denotes the success or failure of the query.
|
Observable<N1qlMetrics> |
info() |
boolean |
parseSuccess()
Immediately denotes initial parsing success of the query.
|
String |
requestId() |
Observable<AsyncN1qlQueryRow> |
rows() |
Observable<Object> |
signature() |
Observable<String> |
status()
Asynchronously returns the final status of the query.
|
public DefaultAsyncN1qlQueryResult(Observable<AsyncN1qlQueryRow> rows, Observable<Object> signature, Observable<N1qlMetrics> info, Observable<JsonObject> errors, Observable<String> finalStatus, boolean parsingSuccess, String requestId, String clientContextId)
public Observable<AsyncN1qlQueryRow> rows()
rows
in interface AsyncN1qlQueryResult
public Observable<Object> signature()
signature
in interface AsyncN1qlQueryResult
row
. This signature is usually a JsonObject
, but could also be any JSON-valid type like a boolean scalar, JsonArray
…public Observable<N1qlMetrics> info()
info
in interface AsyncN1qlQueryResult
public Observable<Boolean> finalSuccess()
AsyncN1qlQueryResult
Asynchronously denotes the success or failure of the query. It could fail slower than with AsyncN1qlQueryResult.parseSuccess()
, for example if a fatal error comes up while streaming the results to the client. Receiving a (single) value for finalSuccess means the query is over.
finalSuccess
in interface AsyncN1qlQueryResult
public Observable<String> status()
AsyncN1qlQueryResult
Asynchronously returns the final status of the query. For example, a successful query will return “success
” (which is equivalent to AsyncN1qlQueryResult.finalSuccess()
returning true). Other statuses include (but are not limited to) “fatal
” when fatal errors occurred and “timeout
” when the query timed out on the server side but not yet on the client side. Receiving a (single) value for status means the query is over.
status
in interface AsyncN1qlQueryResult
public boolean parseSuccess()
AsyncN1qlQueryResult
Immediately denotes initial parsing success of the query.
As rows are processed, it could be that a late failure occurs. See AsyncN1qlQueryResult.finalSuccess()
for the end of processing status.
parseSuccess
in interface AsyncN1qlQueryResult
public Observable<JsonObject> errors()
errors
in interface AsyncN1qlQueryResult
public String requestId()
requestId
in interface AsyncN1qlQueryResult
public String clientContextId()
clientContextId
in interface AsyncN1qlQueryResult
Copyright © 2015 Couchbase, Inc.