2023-08-24 21:09:06 +02:00

20 lines
513 B
Kotlin

package net.mezimmah.wkt9.dao
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import net.mezimmah.wkt9.entity.Setting
@Dao
interface SettingDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insert(setting: Setting)
@Query("SELECT `setting`.* FROM `setting` WHERE `key` = :key")
suspend fun getByKey(key: String): Setting?
@Delete
suspend fun delete(setting: Setting)
}