fix resetting cached TDDs

This commit is contained in:
Milos Kozak 2022-10-12 11:53:02 +02:00
parent 1471d5b5c6
commit d6e3fa9a75

View file

@ -33,7 +33,7 @@ internal interface TotalDailyDoseDao : TraceableDao<TotalDailyDose> {
@Query("SELECT * FROM $TABLE_TOTAL_DAILY_DOSES WHERE dateCreated > :since AND dateCreated <= :until LIMIT :limit OFFSET :offset")
suspend fun getNewEntriesSince(since: Long, until: Long, limit: Int, offset: Int): List<TotalDailyDose>
@Query("DELETE FROM $TABLE_TOTAL_DAILY_DOSES WHERE dateCreated >= :since AND pumpType = :pumpType")
@Query("DELETE FROM $TABLE_TOTAL_DAILY_DOSES WHERE timestamp >= :since AND pumpType = :pumpType")
fun deleteNewerThan(since: Long, pumpType: InterfaceIDs.PumpType)
}