Class ProtostellarCoreQueryOps
java.lang.Object
com.couchbase.client.core.protostellar.query.ProtostellarCoreQueryOps
- All Implemented Interfaces:
CoreQueryOps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionqueryAsync
(String statement, CoreQueryOptions options, CoreQueryContext queryContext, NodeIdentifier target, Function<Throwable, RuntimeException> errorConverter) queryBlocking
(String statement, CoreQueryOptions options, CoreQueryContext queryContext, NodeIdentifier target, Function<Throwable, RuntimeException> errorConverter) Performs a query.queryReactive
(String statement, CoreQueryOptions options, CoreQueryContext queryContext, NodeIdentifier target, Function<Throwable, RuntimeException> errorConverter)
-
Constructor Details
-
ProtostellarCoreQueryOps
-
-
Method Details
-
queryBlocking
public CoreQueryResult queryBlocking(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter) Description copied from interface:CoreQueryOps
Performs a query. This can handle single-query transactions.- Specified by:
queryBlocking
in interfaceCoreQueryOps
- Parameters:
statement
- 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.
-
queryAsync
public CoreAsyncResponse<CoreQueryResult> queryAsync(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter) - Specified by:
queryAsync
in interfaceCoreQueryOps
-
queryReactive
public Mono<CoreReactiveQueryResult> queryReactive(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter) - Specified by:
queryReactive
in interfaceCoreQueryOps
-