@Stability.Internal public class QueryAccessor extends Object
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 and Description |
---|
QueryAccessor(Core core) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<QueryResult> |
queryAsync(QueryRequest request,
QueryOptions.Built options,
JsonSerializer serializer)
Performs a N1QL query and returns the result as a future.
|
Mono<ReactiveQueryResult> |
queryReactive(QueryRequest request,
QueryOptions.Built options,
JsonSerializer serializer)
Performs a N1QL query and returns the result as a future.
|
public QueryAccessor(Core core)
public CompletableFuture<QueryResult> queryAsync(QueryRequest request, QueryOptions.Built options, JsonSerializer serializer)
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.
request
- the request to perform.options
- query options to use.public Mono<ReactiveQueryResult> queryReactive(QueryRequest request, QueryOptions.Built options, JsonSerializer serializer)
request
- the request to perform.options
- query options to use.Copyright © 2020 Couchbase, Inc.. All rights reserved.