@Stability.Internal public class ProtostellarCoreQueryOps extends Object implements CoreQueryOps
| Constructor and Description |
|---|
ProtostellarCoreQueryOps(CoreProtostellar core) |
| Modifier and Type | Method and Description |
|---|---|
CoreAsyncResponse<CoreQueryResult> |
queryAsync(String statement,
CoreQueryOptions options,
CoreQueryContext queryContext,
NodeIdentifier target,
Function<Throwable,RuntimeException> errorConverter) |
CoreQueryResult |
queryBlocking(String statement,
CoreQueryOptions options,
CoreQueryContext queryContext,
NodeIdentifier target,
Function<Throwable,RuntimeException> errorConverter)
Performs a query.
|
Mono<CoreReactiveQueryResult> |
queryReactive(String statement,
CoreQueryOptions options,
CoreQueryContext queryContext,
NodeIdentifier target,
Function<Throwable,RuntimeException> errorConverter) |
public ProtostellarCoreQueryOps(CoreProtostellar core)
public CoreQueryResult queryBlocking(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable,RuntimeException> errorConverter)
CoreQueryOpsqueryBlocking in interface CoreQueryOpsstatement - the statement to executeoptions - query optionsqueryContext - non-null iff this query is on a Scopetarget - this is required for some use-cases (transactions, notably, where all queries in a transaction attempt must be sent to the same node). The way targets are
identified is currently very bound to Classic, and will need to be abstracted if we need to support the same functionality for Protostellar ultimately. However, the nature of Protostellar makes
that unlikely.errorConverter - required for converting Core errors into their final SDK forms. (It could be handled externally in most cases, but this DRYs the logic, and there is
at least one transactions use-case that requires doing this conversion on the rows as they stream back.public CoreAsyncResponse<CoreQueryResult> queryAsync(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable,RuntimeException> errorConverter)
queryAsync in interface CoreQueryOpspublic Mono<CoreReactiveQueryResult> queryReactive(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable,RuntimeException> errorConverter)
queryReactive in interface CoreQueryOpsCopyright © 2024 Couchbase, Inc.. All rights reserved.