Interface ItemResultRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ItemResult,UUID>, org.springframework.data.jpa.repository.JpaRepository<ItemResult,UUID>, org.springframework.data.repository.ListCrudRepository<ItemResult,UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<ItemResult,UUID>, org.springframework.data.repository.PagingAndSortingRepository<ItemResult,UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<ItemResult>, org.springframework.data.repository.Repository<ItemResult,UUID>

public interface ItemResultRepository extends org.springframework.data.jpa.repository.JpaRepository<ItemResult,UUID>
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    long
     
    long
     
    org.springframework.data.domain.Page<ItemResult>
    findByRunOrderByCreatedAtAsc(ExperimentRun run, org.springframework.data.domain.Pageable pageable)
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findByRunOrderByCreatedAtAsc

      org.springframework.data.domain.Page<ItemResult> findByRunOrderByCreatedAtAsc(ExperimentRun run, org.springframework.data.domain.Pageable pageable)
    • countByRun

      long countByRun(ExperimentRun run)
    • countPassedItems

      @Query("SELECT COUNT(DISTINCT i) FROM ItemResult i\nJOIN i.evalResults e\nWHERE i.run = :run\nAND e.success = true\nGROUP BY i\nHAVING COUNT(e) = (SELECT COUNT(e2) FROM EvalResult e2 WHERE e2.itemResult = i)\n") long countPassedItems(ExperimentRun run)
    • countItemsWithAllEvalsPassed

      @Query("SELECT COUNT(i) FROM ItemResult i\nWHERE i.run = :run\nAND NOT EXISTS (SELECT e FROM EvalResult e WHERE e.itemResult = i AND e.success = false)\nAND EXISTS (SELECT e FROM EvalResult e WHERE e.itemResult = i)\n") long countItemsWithAllEvalsPassed(ExperimentRun run)