package com.gh.gamecenter.room.dao

import androidx.room.*
import com.gh.gamecenter.entity.GameCollectionDraft
import io.reactivex.Single

@Dao
interface GameCollectionDraftDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addDraft(entity: GameCollectionDraft)

    @Query("select * from GameCollectionDraft")
    fun getAllDraft(): Single<List<GameCollectionDraft>>

    @Query("select * from GameCollectionDraft")
    fun getDrafts(): List<GameCollectionDraft>

    @Delete
    fun delete(list: List<GameCollectionDraft>)
}