Package dev.dokimos.server.repository
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 TypeMethodDescriptionlongcountByRun(ExperimentRun run) longlongorg.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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods 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
-
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)
-