Package com.couchbase.client.java.query
Class QueryMetaData
java.lang.Object
com.couchbase.client.java.query.QueryMetaData
Stores any non-rows results related to the execution of a particular N1QL query.
- Since:
- 1.0.0
- Author:
- Graham Pople
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the client context identifier string set on the query request.metrics()
Returns theQueryMetrics
as returned by the query engine if enabled.profile()
Returns the profiling information returned by the query engine which is then decoded toJsonObject
Optional
<byte[]> Returns a byte array containing the profiling information returned by the query engine, or an empty optional if no profiling information is available.Returns the request identifier string of the query requestReturns the signature returned by the query engine, parsed as aJsonObject
, or an empty optional if no signature is available.Optional
<byte[]> Returns a byte array containing the signature returned by the query engine, or an empty optional if no signature is available.status()
Returns the raw query execution status as returned by the query enginewarnings()
Returns any warnings returned by the query engine, as aJsonArray
.
-
Constructor Details
-
QueryMetaData
-
-
Method Details
-
requestId
Returns the request identifier string of the query request -
clientContextId
Returns the client context identifier string set on the query request. -
status
Returns the raw query execution status as returned by the query engine -
signature
Returns the signature returned by the query engine, parsed as aJsonObject
, or an empty optional if no signature is available.A signature describes the "shape" of the query results.
For cases where the signature is not known to be a JSON Object, please use
signatureBytes()
instead.- Throws:
DecodingFailureException
- if the signature is not a JSON Object.
-
signatureBytes
Returns a byte array containing the signature returned by the query engine, or an empty optional if no signature is available.The byte array contains JSON describing the "shape" of the query results. For most queries it's a JSON Object, but it can be any JSON type.
-
profile
Returns the profiling information returned by the query engine which is then decoded toJsonObject
It is returned as an Optional which will be empty if no profile information is available.
- Throws:
DecodingFailureException
- when the profile cannot be decoded successfully
-
profileBytes
Returns a byte array containing the profiling information returned by the query engine, or an empty optional if no profiling information is available.The byte array contains a JSON Object.
-
metrics
Returns theQueryMetrics
as returned by the query engine if enabled.- Throws:
DecodingFailureException
- when the metrics cannot be decoded successfully
-
warnings
Returns any warnings returned by the query engine, as aJsonArray
.It is returned as an Optional which will be empty if no warnings were returned
- Throws:
DecodingFailureException
- when the warnings cannot be decoded successfully
-