package com.lc.myapplication.security.mysoundstwo.room;

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 java.util.List;

@Dao
public interface ScaryPrankLikeDao {
    @Query("select * from scarylike_table where name=:name")
    ScaryPrankLikeEntity QueryLikeName(String name);

    @Update
    void UpdateLikeSounds(ScaryPrankLikeEntity entity);
    @Query("SELECT * FROM scarylike_table")
    List<ScaryPrankLikeEntity> getAllMessage();

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    void insertLikeData(ScaryPrankLikeEntity entity);

    @Query("select * from scarylike_table where soundslike=:soundslike")
    List<ScaryPrankLikeEntity> getLike(boolean soundslike);
    @Delete()
    void delete(ScaryPrankLikeEntity entity);
    @Query("select * from scarylike_table where resource=:reource")
    List<ScaryPrankLikeEntity> queryreource(int reource);
    @Query("delete from scarylike_table where name=:name")
    void deletelike(String name);

}
