Package com.couchbase.client.java.query
Class QueryAccessor
- java.lang.Object
-
- com.couchbase.client.java.query.QueryAccessor
-
@Internal public class QueryAccessor extends Object
Converts requests and responses for N1QL queries.Note that this accessor also transparently deals with prepared statements and the associated query cache.
Also, this class has internal functionality and is not intended to be called from the user directly.
-
-
Constructor Summary
Constructors Constructor Description QueryAccessor(Core core)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<QueryResult>
queryAsync(QueryRequest request, QueryOptions.Built options)
Performs a N1QL query and returns the result as a future.Mono<ReactiveQueryResult>
queryReactive(QueryRequest request, QueryOptions.Built options)
Performs a N1QL query and returns the result as a future.
-
-
-
Constructor Detail
-
QueryAccessor
public QueryAccessor(Core core)
-
-
Method Detail
-
queryAsync
public CompletableFuture<QueryResult> queryAsync(QueryRequest request, QueryOptions.Built options)
Performs a N1QL query and returns the result as a future.Note that compared to the reactive method, this one collects the rows into a list and makes sure everything is part of the result. If you need backpressure, go with reactive.
- Parameters:
request
- the request to perform.options
- query options to use.- Returns:
- the future once the result is complete.
-
queryReactive
public Mono<ReactiveQueryResult> queryReactive(QueryRequest request, QueryOptions.Built options)
Performs a N1QL query and returns the result as a future.- Parameters:
request
- the request to perform.options
- query options to use.- Returns:
- the mono once the result is complete.
-
-