package com.keyborad.theme.trendyborad.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.keyborad.theme.trendyborad.bean.BeanDetails

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

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



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


    @Delete
    suspend fun delete(data: BeanDetails)

    @Update
    suspend fun updateLike(data: BeanDetails)
}