aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-03-07 19:25:11 -0500
committerAllan Wang <me@allanwang.ca>2019-03-07 19:25:11 -0500
commitcac563f6c6a2656c74527bfa2c8b5780765baf69 (patch)
treee3346fdf18297fb3b9d13a8b7daaf3168cf36e51 /app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
parent47ac9c218e92ec25b412e9c8c66812e53341052d (diff)
downloadfrost-cac563f6c6a2656c74527bfa2c8b5780765baf69.tar.gz
frost-cac563f6c6a2656c74527bfa2c8b5780765baf69.tar.bz2
frost-cac563f6c6a2656c74527bfa2c8b5780765baf69.zip
Prepare generic db
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
index d2771754..01baa43e 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
@@ -119,6 +119,9 @@ interface NotificationDao {
@Query("DELETE FROM notifications WHERE userId = :userId AND type = :type")
fun _deleteNotifications(userId: Long, type: String)
+ @Query("DELETE FROM notifications")
+ suspend fun deleteAll()
+
/**
* It is assumed that the notification batch comes from the same user
*/