Package com.couchbase.client.java.query
Class ReactiveQueryResult
- java.lang.Object
-
- com.couchbase.client.java.query.ReactiveQueryResult
-
-
Constructor Summary
Constructors Constructor Description ReactiveQueryResult(QueryResponse response, JsonSerializer serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<QueryMetaData>
metaData()
Returns aMono
containing aQueryMetaData
, giving access to the additional metadata associated with this query.<T> Flux<T>
rowsAs(TypeRef<T> target)
Get aFlux
which publishes the rows that were fetched by the query which are then decoded to the requested entity type<T> Flux<T>
rowsAs(Class<T> target)
Get aFlux
which publishes the rows that were fetched by the query which are then decoded to the requested entity classFlux<JsonObject>
rowsAsObject()
Get aFlux
which publishes the rows that were fetched by the query which are then decoded toJsonObject
-
-
-
Constructor Detail
-
ReactiveQueryResult
@Internal public ReactiveQueryResult(QueryResponse response, JsonSerializer serializer)
-
-
Method Detail
-
rowsAsObject
public Flux<JsonObject> rowsAsObject()
Get aFlux
which publishes the rows that were fetched by the query which are then decoded toJsonObject
- Returns:
Flux
-
rowsAs
public <T> Flux<T> rowsAs(Class<T> target)
Get aFlux
which publishes the rows that were fetched by the query which are then decoded to the requested entity class- Parameters:
target
- target class for converting the query row- Returns:
Flux
- Throws:
DecodingFailureException
- (async) if the decoding cannot be completed successfully
-
rowsAs
public <T> Flux<T> rowsAs(TypeRef<T> target)
Get aFlux
which publishes the rows that were fetched by the query which are then decoded to the requested entity type- Parameters:
target
- target type for converting the query row- Returns:
Flux
- Throws:
DecodingFailureException
- (async) if the decoding cannot be completed successfully
-
metaData
public Mono<QueryMetaData> metaData()
Returns aMono
containing aQueryMetaData
, giving access to the additional metadata associated with this query. Note that the metadata will only be available once all rows have been received, so it is recommended that you first handle the rows in your code, and then the metadata. This will avoid buffering all the rows in-memory.
-
-