use of org.hibernate.loader.custom.sql.SQLCustomQuery in project hibernate-reactive by hibernate.
the class ReactiveStatelessSessionImpl method executeReactiveUpdate.
@Override
public CompletionStage<Integer> executeReactiveUpdate(NativeSQLQuerySpecification specification, QueryParameters parameters) {
checkOpen();
parameters.validateParameters();
// getNativeQueryPlan( specification );
ReactiveNativeSQLQueryPlan reactivePlan = new ReactiveNativeSQLQueryPlan(specification.getQueryString(), new SQLCustomQuery(specification.getQueryString(), specification.getQueryReturns(), specification.getQuerySpaces(), getFactory()));
return reactivePlan.performExecuteReactiveUpdate(parameters, this).whenComplete((count, x) -> {
getPersistenceContext().clear();
afterOperation(x == null);
});
}
use of org.hibernate.loader.custom.sql.SQLCustomQuery in project hibernate-reactive by hibernate.
the class ReactiveSessionImpl method executeReactiveUpdate.
@Override
public CompletionStage<Integer> executeReactiveUpdate(NativeSQLQuerySpecification specification, QueryParameters parameters) {
checkOpenOrWaitingForAutoClose();
pulseTransactionCoordinator();
parameters.validateParameters();
// getNativeQueryPlan( specification );
ReactiveNativeSQLQueryPlan reactivePlan = new ReactiveNativeSQLQueryPlan(specification.getQueryString(), new SQLCustomQuery(specification.getQueryString(), specification.getQueryReturns(), specification.getQuerySpaces(), getFactory()));
return reactiveAutoFlushIfRequired(reactivePlan.getCustomQuery().getQuerySpaces()).thenCompose(v -> reactivePlan.performExecuteReactiveUpdate(parameters, this)).whenComplete((count, x) -> {
afterOperation(x == null);
delayedAfterCompletion();
});
}
Aggregations