Package com.couchbase.client.java.query
Class QueryResult
java.lang.Object
com.couchbase.client.java.query.QueryResult
The result of a N1QL query, including rows and associated metadata.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionQueryResult(QueryChunkHeader header, List<QueryChunkRow> rows, QueryChunkTrailer trailer, JsonSerializer serializer) Creates a new QueryResult. -
Method Summary
Modifier and TypeMethodDescriptionmetaData()Returns theQueryMetaDatagiving access to the additional metadata associated with this query.<T> List<T>Returns all rows, converted into instances of the target type.<T> List<T>Returns all rows, converted into instances of the target class.Returns all rows, converted intoJsonObjects.toString()
-
Constructor Details
-
QueryResult
@Internal public QueryResult(QueryChunkHeader header, List<QueryChunkRow> rows, QueryChunkTrailer trailer, JsonSerializer serializer) Creates a new QueryResult.- Parameters:
header- the query header.rows- the query rows.trailer- the query trailer.
-
-
Method Details
-
rowsAsObject
Returns all rows, converted intoJsonObjects.- Throws:
DecodingFailureException- if any row could not be successfully deserialized.
-
rowsAs
Returns all rows, converted into instances of the target class.- Parameters:
target- the target class to deserialize into.- Throws:
DecodingFailureException- if any row could not be successfully deserialized.
-
rowsAs
Returns all rows, converted into instances of the target type.- Parameters:
target- the target type to deserialize into.- Throws:
DecodingFailureException- if any row could not be successfully deserialized.
-
metaData
Returns theQueryMetaDatagiving access to the additional metadata associated with this query. -
toString
-