From eed091aad29b76ac3340e84ae90f4ffc01868491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Pich?= Date: Tue, 30 Aug 2022 09:07:24 +0200 Subject: [PATCH] Update row in mailboxes table on primary key conflict (#1954) --- app/src/main/java/io/github/wulkanowy/data/db/dao/BaseDao.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/github/wulkanowy/data/db/dao/BaseDao.kt b/app/src/main/java/io/github/wulkanowy/data/db/dao/BaseDao.kt index 048e9e3c..056a5cbd 100644 --- a/app/src/main/java/io/github/wulkanowy/data/db/dao/BaseDao.kt +++ b/app/src/main/java/io/github/wulkanowy/data/db/dao/BaseDao.kt @@ -2,11 +2,12 @@ package io.github.wulkanowy.data.db.dao import androidx.room.Delete import androidx.room.Insert +import androidx.room.OnConflictStrategy import androidx.room.Update interface BaseDao { - @Insert + @Insert(onConflict = OnConflictStrategy.REPLACE) suspend fun insertAll(items: List): List @Update