chore(execution): remove unused ExecutionRepository.update() method

This commit is contained in:
Loïc Mathieu
2025-12-18 13:15:36 +01:00
parent 6599ce59df
commit d5222ee1ee
3 changed files with 2 additions and 35 deletions

View File

@@ -151,8 +151,6 @@ public interface ExecutionRepositoryInterface extends QueryBuilderInterface<Exec
Execution save(Execution execution);
Execution update(Execution execution);
default Function<String, String> sortMapping() throws IllegalArgumentException {
return s -> s;
}

View File

@@ -619,22 +619,6 @@ public abstract class AbstractExecutionRepositoryTest {
assertThat(result.stream().filter(executionCount -> executionCount.getNamespace().equals(NAMESPACE)).findFirst().get().getCount()).isEqualTo(14L);
}
@Test
protected void update() {
var tenant = TestsUtils.randomTenant(this.getClass().getSimpleName());
Execution execution = ExecutionFixture.EXECUTION_1(tenant);
executionRepository.save(execution);
Label label = new Label("key", "value");
Execution updated = execution.toBuilder().labels(List.of(label)).build();
executionRepository.update(updated);
Optional<Execution> validation = executionRepository.findById(tenant, updated.getId());
assertThat(validation.isPresent()).isTrue();
assertThat(validation.get().getLabels().size()).isEqualTo(1);
assertThat(validation.get().getLabels().getFirst()).isEqualTo(label);
}
@Test
void shouldFindLatestExecutionGivenState() {
var tenant = TestsUtils.randomTenant(this.getClass().getSimpleName());
@@ -1207,7 +1191,7 @@ inject(tenant);
executionRepository.delete(savedB);
}
}
@Test
protected void shouldFindExecutionByTrigger() {
// GIVEN
@@ -1215,7 +1199,7 @@ inject(tenant);
Execution execution = ExecutionFixture.EXECUTION_1(tenant);
TriggerId trigger = TriggerId.of(execution.getTenantId(), execution.getNamespace(), execution.getFlowId(), "trigger");
execution = execution
.toBuilder()
.trigger(ExecutionTrigger

View File

@@ -829,21 +829,6 @@ public abstract class AbstractJdbcExecutionRepository extends AbstractJdbcCrudRe
return Execution.class;
}
@Override
public Execution update(Execution execution) {
return this.jdbcRepository
.getDslContextWrapper()
.transactionResult(configuration -> {
DSL.using(configuration)
.update(this.jdbcRepository.getTable())
.set(this.jdbcRepository.persistFields((execution)))
.where(field("key").eq(execution.getId()))
.execute();
return execution;
});
}
@SneakyThrows
@Override
public Execution delete(Execution execution) {