Repository: android/nowinandroid
Issue: [Bug]: TopicDao possible clean-up required

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is there a StackOverflow question about this issue?

- [X] I have searched StackOverflow

### What happened?

I believe you replaced @Update with @Upsert in synchronizer in modelUpdater lambda - upsertTopics instead of updateTopics, so the query below is unused in the TopicDao - should be deleted?

```
@Update
    suspend fun updateTopics(entities: List<TopicEntity>)
```

```
override suspend fun syncWith(synchronizer: Synchronizer): Boolean =
        synchronizer.changeListSync(
            versionReader = ChangeListVersions::topicVersion,
            changeListFetcher = { currentVersion ->
                network.getTopicChangeList(after = currentVersion)
            },
            versionUpdater = { latestVersion ->
                copy(topicVersion = latestVersion)
            },
            modelDeleter = topicDao::deleteTopics,
            modelUpdater = { changedIds ->
                val networkTopics = network.getTopics(ids = changedIds)
                topicDao.upsertTopics(
                    entities = networkTopics.map(NetworkTopic::asEntity)
                )
            }
        )
```


### Relevant logcat output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Changed files:
core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt
core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestNewsResourceDao.kt
core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt
core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt

diff --git a/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestNewsResourceDao.kt b/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestNewsResourceDao.kt
index baeff4a6..128c0f06 100644
--- a/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestNewsResourceDao.kt
+++ b/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestNewsResourceDao.kt
@@ -83,10 +83,6 @@ class TestNewsResourceDao : NewsResourceDao {
         return entities.map { it.id.toLong() }
     }
 
-    override suspend fun updateNewsResources(entities: List<NewsResourceEntity>) {
-        throw NotImplementedError("Unused in tests")
-    }
-
     override suspend fun upsertNewsResources(newsResourceEntities: List<NewsResourceEntity>) {
         entitiesStateFlow.value = newsResourceEntities
     }
diff --git a/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt b/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt
index 8ac0dc0b..96402309 100644
--- a/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt
+++ b/core/data/src/test/java/com/google/samples/apps/nowinandroid/core/data/testdoubles/TestTopicDao.kt
@@ -58,10 +58,6 @@ class TestTopicDao : TopicDao {
         return topicEntities.map { it.id.toLong() }
     }
 
-    override suspend fun updateTopics(entities: List<TopicEntity>) {
-        throw NotImplementedError("Unused in tests")
-    }
-
     override suspend fun upsertTopics(entities: List<TopicEntity>) {
         entitiesStateFlow.value = entities
     }
diff --git a/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt b/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
index 782e5c87..a05507a8 100644
--- a/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
+++ b/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/NewsResourceDao.kt
@@ -21,7 +21,6 @@ import androidx.room.Insert
 import androidx.room.OnConflictStrategy
 import androidx.room.Query
 import androidx.room.Transaction
-import androidx.room.Update
 import androidx.room.Upsert
 import com.google.samples.apps.nowinandroid.core.database.model.NewsResourceEntity
 import com.google.samples.apps.nowinandroid.core.database.model.NewsResourceTopicCrossRef
@@ -72,12 +71,6 @@ interface NewsResourceDao {
     @Insert(onConflict = OnConflictStrategy.IGNORE)
     suspend fun insertOrIgnoreNewsResources(entities: List<NewsResourceEntity>): List<Long>
 
-    /**
-     * Updates [entities] in the db that match the primary key, and no-ops if they don't
-     */
-    @Update
-    suspend fun updateNewsResources(entities: List<NewsResourceEntity>)
-
     /**
      * Inserts or updates [newsResourceEntities] in the db under the specified primary keys
      */
diff --git a/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt b/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt
index 37724af6..210f55c2 100644
--- a/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt
+++ b/core/database/src/main/java/com/google/samples/apps/nowinandroid/core/database/dao/TopicDao.kt
@@ -20,7 +20,6 @@ import androidx.room.Dao
 import androidx.room.Insert
 import androidx.room.OnConflictStrategy
 import androidx.room.Query
-import androidx.room.Update
 import androidx.room.Upsert
 import com.google.samples.apps.nowinandroid.core.database.model.TopicEntity
 import kotlinx.coroutines.flow.Flow
@@ -55,12 +54,6 @@ interface TopicDao {
     @Insert(onConflict = OnConflictStrategy.IGNORE)
     suspend fun insertOrIgnoreTopics(topicEntities: List<TopicEntity>): List<Long>
 
-    /**
-     * Updates [entities] in the db that match the primary key, and no-ops if they don't
-     */
-    @Update
-    suspend fun updateTopics(entities: List<TopicEntity>)
-
     /**
      * Inserts or updates [entities] in the db under the specified primary keys
      */