Class 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 Detail

      • QueryAccessor

        public QueryAccessor​(Core core)
    • Method Detail

      • queryAsync

        public CompletableFuture<QueryResult> queryAsync​(QueryRequest request,
                                                         QueryOptions.Built options,
                                                         JsonSerializer serializer)
        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.