Interface FederationBatchInfoRepository

    • Method Detail

      • saveDoNothingOnConflict

        @Modifying
        @Query("INSERT INTO federation_batch_info (batch_tag, date, status) VALUES (:batchTag, :date, :status) ON CONFLICT DO NOTHING")
        boolean saveDoNothingOnConflict​(@Param("batchTag")
                                        String batchTag,
                                        @Param("date")
                                        LocalDate date,
                                        @Param("status")
                                        String status)
      • saveDoUpdateStatusOnConflict

        @Modifying
        @Query("INSERT INTO federation_batch_info (batch_tag, date, status) VALUES (:batchTag, :date, :status) ON CONFLICT (batch_tag) DO UPDATE SET status=:status")
        void saveDoUpdateStatusOnConflict​(@Param("batchTag")
                                          String batchTag,
                                          @Param("date")
                                          LocalDate date,
                                          @Param("status")
                                          String status)
      • countOlderThan

        @Query("SELECT COUNT(*) FROM federation_batch_info WHERE date<:threshold")
        int countOlderThan​(@Param("threshold")
                           LocalDate date)
      • deleteOlderThan

        @Modifying
        @Query("DELETE FROM federation_batch_info WHERE date<:threshold")
        void deleteOlderThan​(@Param("threshold")
                             LocalDate date)
      • countForDate

        @Query("SELECT COUNT(*) FROM federation_batch_info WHERE date=:date")
        int countForDate​(@Param("date")
                         LocalDate date)
      • deleteForDate

        @Modifying
        @Query("DELETE FROM federation_batch_info WHERE date=:date")
        void deleteForDate​(@Param("date")
                           LocalDate date)