public class DefaultN1qlQueryResult extends Object implements N1qlQueryResult
Constructor and Description |
---|
DefaultN1qlQueryResult(List<AsyncN1qlQueryRow> rows,
Object signature,
N1qlMetrics info,
List<JsonObject> errors,
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() |
String |
requestId() |
Iterator<N1qlQueryRow> |
rows() |
Object |
signature() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public DefaultN1qlQueryResult(List<AsyncN1qlQueryRow> rows, Object signature, N1qlMetrics info, List<JsonObject> errors, Boolean finalSuccess, boolean parseSuccess, String requestId, String clientContextId)
Create a default blocking representation of a query result.
rows
- the list of rows.signature
- the signature for rows.info
- the metrics.errors
- the list of errors and warnings.finalSuccess
- the definitive (but potentially delayed) result of the query.parseSuccess
- the intermediate result of the querypublic List<N1qlQueryRow> allRows()
allRows
in interface N1qlQueryResult
N1qlQueryRow
, the results of the query, if successful.public Iterator<N1qlQueryRow> rows()
rows
in interface N1qlQueryResult
N1qlQueryRow
, the results of the query, if successful.public Object signature()
signature
in interface N1qlQueryResult
row
. 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 N1qlQueryResult
public boolean parseSuccess()
parseSuccess
in interface N1qlQueryResult
public List<JsonObject> errors()
errors
in interface N1qlQueryResult
public boolean finalSuccess()
N1qlQueryResult
Denotes the success or failure of the query. It could fail slower than with N1qlQueryResult.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 N1qlQueryResult
public Iterator<N1qlQueryRow> iterator()
iterator
in interface Iterable<N1qlQueryRow>
public String requestId()
requestId
in interface N1qlQueryResult
public String clientContextId()
clientContextId
in interface N1qlQueryResult
Copyright © 2014 Couchbase, Inc.