use of com.couchbase.client.java.view.ViewOptions in project couchbase-jvm-clients by couchbase.
the class ReactiveBucket method viewQuery.
public Mono<ReactiveViewResult> viewQuery(final String designDoc, final String viewName, final ViewOptions options) {
return Mono.defer(() -> {
notNull(options, "ViewOptions", () -> new ReducedViewErrorContext(designDoc, viewName, name()));
ViewOptions.Built opts = options.build();
JsonSerializer serializer = opts.serializer() == null ? environment().jsonSerializer() : opts.serializer();
return ViewAccessor.viewQueryReactive(asyncBucket.core(), asyncBucket.viewRequest(designDoc, viewName, opts), serializer);
});
}
use of com.couchbase.client.java.view.ViewOptions in project couchbase-jvm-clients by couchbase.
the class AsyncBucket method viewQuery.
public CompletableFuture<ViewResult> viewQuery(final String designDoc, final String viewName, final ViewOptions options) {
notNull(options, "ViewOptions", () -> new ReducedViewErrorContext(designDoc, viewName, name));
ViewOptions.Built opts = options.build();
JsonSerializer serializer = opts.serializer() == null ? environment.jsonSerializer() : opts.serializer();
return ViewAccessor.viewQueryAsync(core, viewRequest(designDoc, viewName, opts), serializer);
}
Aggregations