@InterfaceStability.Committed @InterfaceAudience.Public public class DefaultN1qlQueryResult extends Object implements N1qlQueryResult
| Constructor and Description |
|---|
DefaultN1qlQueryResult(List<AsyncN1qlQueryRow> rows,
Object signature,
N1qlMetrics info,
List<JsonObject> errors,
JsonObject profileInfo,
String finalStatus,
Boolean finalSuccess,
boolean parseSuccess,
String requestId,
String clientContextId)
Create a default blocking representation of a query result.
|
| Modifier and Type | Method and Description |
|---|---|
List<N1qlQueryRow> |
allRows() |
String |
clientContextId() |
List<JsonObject> |
errors() |
boolean |
finalSuccess()
Denotes the success or failure of the query.
|
N1qlMetrics |
info() |
Iterator<N1qlQueryRow> |
iterator() |
boolean |
parseSuccess() |
JsonObject |
profileInfo() |
String |
requestId() |
Iterator<N1qlQueryRow> |
rows() |
Object |
signature() |
String |
status()
Returns the final status of the query.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic DefaultN1qlQueryResult(List<AsyncN1qlQueryRow> rows, Object signature, N1qlMetrics info, List<JsonObject> errors, JsonObject profileInfo, String finalStatus, Boolean finalSuccess, boolean parseSuccess, String requestId, String clientContextId)
rows - the list of rows.signature - the signature for rows.info - the metrics.profileInfo - the profile informationerrors - the list of errors and warnings.finalStatus - the definitive (but potentially delayed) status of the query.finalSuccess - the definitive (but potentially delayed) success of the query.parseSuccess - the intermediate result of the querypublic List<N1qlQueryRow> allRows()
allRows in interface N1qlQueryResultN1qlQueryRow, the results of the query, if successful.public Iterator<N1qlQueryRow> rows()
rows in interface N1qlQueryResultN1qlQueryRow, the results of the query, if successful.public Object signature()
signature in interface N1qlQueryResultrow. This signature is usually a
JsonObject, but could also be any JSON-valid type like a boolean scalar, JsonArray...public N1qlMetrics info()
info in interface N1qlQueryResultpublic JsonObject profileInfo()
profileInfo in interface N1qlQueryResultpublic boolean parseSuccess()
parseSuccess in interface N1qlQueryResultpublic List<JsonObject> errors()
errors in interface N1qlQueryResultpublic boolean finalSuccess()
N1qlQueryResultN1qlQueryResult.parseSuccess(), for example if a fatal error comes up while streaming the results
to the client. This method blocks until the query is over and the success can be established.finalSuccess in interface N1qlQueryResultpublic String status()
N1qlQueryResultsuccess"
(which is equivalent to N1qlQueryResult.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. This method blocks until the query is over and the status can be established.status in interface N1qlQueryResultpublic Iterator<N1qlQueryRow> iterator()
iterator in interface Iterable<N1qlQueryRow>public String requestId()
requestId in interface N1qlQueryResultpublic String clientContextId()
clientContextId in interface N1qlQueryResultCopyright © 2015 Couchbase, Inc.