private QueryBuilder queryForFilter(ScheduledExecutionsFilter filter, boolean orderByPriority) {
    final QueryBuilder q = QueryBuilder.selectFromTable(tableName);

    filter.getPickedValue().ifPresent(value -> q.andCondition(new PickedCondition(value)));

    q.orderBy(orderByPriority ? "priority desc, execution_time asc" : "execution_time asc");
    return q;
  }
Instead of doing delete+insert, we allow updating an existing execution will all new fields

@return the execution-time of the new execution
db-scheduler/src/main/java/com/github/kagkarlsson/scheduler/jdbc/JdbcTaskRepository.java