Interface GrayReleaseRepository

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

@Repository public interface GrayReleaseRepository extends org.springframework.data.jpa.repository.JpaRepository<GrayReleaseMetrics,Long>
  • Method Details

    • findByFeatureAndTimestampBetween

      List<GrayReleaseMetrics> findByFeatureAndTimestampBetween(String feature, LocalDateTime start, LocalDateTime end)
    • findFirstByUserUidAndFeatureOrderByTimestampDesc

      GrayReleaseMetrics findFirstByUserUidAndFeatureOrderByTimestampDesc(String userUid, String feature)
    • countByFeatureAndTimestampBetween

      @Query("SELECT COUNT(m) FROM GrayReleaseMetrics m WHERE m.feature = ?1 AND m.timestamp BETWEEN ?2 AND ?3") long countByFeatureAndTimestampBetween(String feature, LocalDateTime start, LocalDateTime end)
    • countSuccessByFeatureAndTimestampBetween

      @Query("SELECT COUNT(m) FROM GrayReleaseMetrics m WHERE m.feature = ?1 AND m.success = true AND m.timestamp BETWEEN ?2 AND ?3") long countSuccessByFeatureAndTimestampBetween(String feature, LocalDateTime start, LocalDateTime end)
    • countUniqueUsersByFeatureAndTimestampBetween

      @Query("SELECT COUNT(DISTINCT m.userUid) FROM GrayReleaseMetrics m WHERE m.feature = ?1 AND m.timestamp BETWEEN ?2 AND ?3") long countUniqueUsersByFeatureAndTimestampBetween(String feature, LocalDateTime start, LocalDateTime end)