package com.rainbow.app.keyboard.mydb

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.rainbow.app.keyboard.javabean.DetailsjavaBean

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

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



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


    @Delete
    suspend fun delete(data: DetailsjavaBean)

    @Update
    suspend fun updateLike(data: DetailsjavaBean)
}