|
|
@ -20,7 +20,6 @@ import androidx.room.Dao
|
|
|
|
import androidx.room.Insert
|
|
|
|
import androidx.room.Insert
|
|
|
|
import androidx.room.OnConflictStrategy
|
|
|
|
import androidx.room.OnConflictStrategy
|
|
|
|
import androidx.room.Query
|
|
|
|
import androidx.room.Query
|
|
|
|
import androidx.room.Update
|
|
|
|
|
|
|
|
import androidx.room.Upsert
|
|
|
|
import androidx.room.Upsert
|
|
|
|
import com.google.samples.apps.nowinandroid.core.database.model.TopicEntity
|
|
|
|
import com.google.samples.apps.nowinandroid.core.database.model.TopicEntity
|
|
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
|
import kotlinx.coroutines.flow.Flow
|
|
|
@ -58,12 +57,6 @@ interface TopicDao {
|
|
|
|
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
|
|
|
@Insert(onConflict = OnConflictStrategy.IGNORE)
|
|
|
|
suspend fun insertOrIgnoreTopics(topicEntities: List<TopicEntity>): List<Long>
|
|
|
|
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
|
|
|
|
* Inserts or updates [entities] in the db under the specified primary keys
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|