public class DefaultQueryResult extends Object implements QueryResult
| Constructor and Description |
|---|
DefaultQueryResult(List<AsyncQueryRow> rows,
Object signature,
QueryMetrics 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<QueryRow> |
allRows() |
String |
clientContextId() |
List<JsonObject> |
errors() |
boolean |
finalSuccess()
Denotes the success or failure of the query.
|
QueryMetrics |
info() |
Iterator<QueryRow> |
iterator() |
boolean |
parseSuccess() |
String |
requestId() |
Iterator<QueryRow> |
rows() |
Object |
signature() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DefaultQueryResult(List<AsyncQueryRow> rows, Object signature, QueryMetrics 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<QueryRow> allRows()
allRows in interface QueryResultQueryRow, the results of the query, if successful.public Iterator<QueryRow> rows()
rows in interface QueryResultQueryRow, the results of the query, if successful.public Object signature()
signature in interface QueryResultrow. This signature is usually a JsonObject, but could also be any JSON-valid type like a boolean scalar, JsonArray…public QueryMetrics info()
info in interface QueryResultpublic boolean parseSuccess()
parseSuccess in interface QueryResultpublic List<JsonObject> errors()
errors in interface QueryResultpublic boolean finalSuccess()
QueryResultDenotes the success or failure of the query. It could fail slower than with QueryResult.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 QueryResultpublic String requestId()
requestId in interface QueryResultpublic String clientContextId()
clientContextId in interface QueryResultCopyright © 2014 Couchbase, Inc.