package com.app.input.breeze.board.database

import androidx.lifecycle.LiveData
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.app.input.breeze.board.bean.KeyboardTheme

@Dao
interface FavoriteThemeDao {
    @Insert(onConflict = OnConflictStrategy.Companion.IGNORE)
    suspend fun insertData(data: KeyboardTheme): Long

    @Query("select * from KeyboardTheme ")
     fun queryAllLike(): LiveData<List<KeyboardTheme?>?>



    @Query("select * from KeyboardTheme  where titleName = :title ")
    suspend fun queryIsLike(title: String ): KeyboardTheme?


    @Delete
    suspend fun delete(data: KeyboardTheme)

    @Update
    suspend fun updateLike(data: KeyboardTheme)
}