package io.nexilis.service.data.daos

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import io.nexilis.service.data.entities.*

@Dao
interface RemoteKeyDao {

    @Query("select * from RemoteKey where `id` = :id")
    fun get(id: String): RemoteKey?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(entity: RemoteKey)

    @Query("delete from RemoteKey where `id` = :id")
    suspend fun delete(id: String)

}