use of com.couchbase.client.core.error.context.ReducedQueryErrorContext in project couchbase-jvm-clients by couchbase.
the class AsyncCluster method query.
/**
* Performs a N1QL query with custom {@link QueryOptions}.
*
* @param statement the N1QL query statement as a raw string.
* @param options the custom options for this query.
* @return the {@link QueryResult} once the response arrives successfully.
*/
public CompletableFuture<QueryResult> query(final String statement, final QueryOptions options) {
notNull(options, "QueryOptions", () -> new ReducedQueryErrorContext(statement));
final QueryOptions.Built opts = options.build();
JsonSerializer serializer = opts.serializer() == null ? environment.get().jsonSerializer() : opts.serializer();
return queryAccessor.queryAsync(queryRequest(statement, opts), opts, serializer);
}
Aggregations