#27 -- fix long execution time of removing commits

This commit is contained in:
Anton Romanov 2021-04-28 12:00:30 +04:00
parent f1cf6c8d2f
commit 94e2dfbe2c

View File

@ -10,7 +10,6 @@ import org.springframework.stereotype.Service;
import ru.ulstu.extractor.model.Commit;
import ru.ulstu.extractor.repository.CommitRepository;
import javax.transaction.Transactional;
import java.util.List;
import java.util.stream.Collectors;
@ -40,9 +39,8 @@ public class CommitService {
}).collect(Collectors.toList());
}
@Transactional
public void deleteWithEmptyIds() {
commitRepository.deleteByBranchIsNull();
jdbcTemplate.update("DELETE FROM commit where branch_id is null");
}
public void updateBranchId(List<Commit> commits, Integer branchId) {