public class GenericQueryResponse extends AbstractCouchbaseResponse
Observable
, most of them of
ByteBuf
. Note that it is important that these streams are consumed and their ByteBuf released.
In order to reuse the values of a section but still correctly release the ByteBuf, the best is to
convert them into an appropriate gc-able value, release the buffer and cache the resulting stream.
If one isn't interested in a particular sub-section, it should still be released by subscribing a
Buffers.BYTE_BUF_RELEASER
to its stream.Constructor and Description |
---|
GenericQueryResponse(rx.Observable<ByteBuf> errors,
rx.Observable<ByteBuf> rows,
rx.Observable<ByteBuf> signature,
rx.Observable<String> queryStatus,
rx.Observable<ByteBuf> info,
rx.Observable<ByteBuf> profileInfo,
CouchbaseRequest request,
ResponseStatus status,
String requestId,
String clientRequestId) |
Modifier and Type | Method and Description |
---|---|
String |
clientRequestId() |
rx.Observable<ByteBuf> |
errors()
If there were errors and/or warnings while executing the query, contains a
ByteBuf for each error
and each warning. |
rx.Observable<ByteBuf> |
info()
Contains a single
ByteBuf representing the JSON object of query execution metrics (or empty if metrics
haven't been activated). |
rx.Observable<ByteBuf> |
profileInfo()
Contains a single
ByteBuf representing the JSON object of query profile information (or empty if profile
haven't been activated). |
rx.Observable<String> |
queryStatus()
Contains a single String denoting the status of the query (success, running, errors, completed, stopped, timeout,
fatal).
|
String |
requestId() |
rx.Observable<ByteBuf> |
rows()
Contains one
ByteBuf for each result item returned by the server. |
rx.Observable<ByteBuf> |
signature()
Contains a single
ByteBuf representing the N1QL json signature of the results. |
creationTime, request, status, statusDetails, statusDetails, toString
public GenericQueryResponse(rx.Observable<ByteBuf> errors, rx.Observable<ByteBuf> rows, rx.Observable<ByteBuf> signature, rx.Observable<String> queryStatus, rx.Observable<ByteBuf> info, rx.Observable<ByteBuf> profileInfo, CouchbaseRequest request, ResponseStatus status, String requestId, String clientRequestId)
public rx.Observable<ByteBuf> rows()
ByteBuf
for each result item returned by the server. Each item is a JSON object.public rx.Observable<ByteBuf> signature()
ByteBuf
representing the N1QL json signature of the results. May not appear at all
if there are no results (in case of fatal errors for example).public rx.Observable<ByteBuf> errors()
ByteBuf
for each error
and each warning. These are JSON objects, that should at least contain a 'msg' and a 'code'.public rx.Observable<String> queryStatus()
public rx.Observable<ByteBuf> info()
ByteBuf
representing the JSON object of query execution metrics (or empty if metrics
haven't been activated).public rx.Observable<ByteBuf> profileInfo()
ByteBuf
representing the JSON object of query profile information (or empty if profile
haven't been activated).public String requestId()
public String clientRequestId()
Copyright © 2021 Couchbase, Inc.. All rights reserved.