Interface CoreQueryOps
- All Known Implementing Classes:
ClassicCoreQueryOps
,ProtostellarCoreQueryOps
-
Method Summary
Modifier and TypeMethodDescriptionqueryAsync
(String statement, CoreQueryOptions options, CoreQueryContext queryContext, NodeIdentifier target, Function<Throwable, RuntimeException> errorConverter) default CoreQueryResult
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)
-
Method Details
-
queryBlocking
default CoreQueryResult queryBlocking(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter) Performs a query. This can handle single-query transactions.- 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
CoreAsyncResponse<CoreQueryResult> queryAsync(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter) -
queryReactive
Mono<CoreReactiveQueryResult> queryReactive(String statement, CoreQueryOptions options, @Nullable CoreQueryContext queryContext, @Nullable NodeIdentifier target, @Nullable Function<Throwable, RuntimeException> errorConverter)
-