package com.app.wave.keyboard.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.wave.keyboard.bean.DetailsBean

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

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



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


    @Delete
    suspend fun delete(data: DetailsBean)

    @Update
    suspend fun updateLike(data: DetailsBean)
}