package com.example.prettywallpapers.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 PrettyPaperDao {
    @Query("select * from table_name where likeid=:likeid")
    PrettyPaperEntity QueryLikeId(String likeid);

    @Update
    void UpdateLikePaper(PrettyPaperEntity prettyPaperEntity);
    @Query("SELECT * FROM table_name")
    List<PrettyPaperEntity> getAllUsers();

    @Insert(onConflict = OnConflictStrategy.IGNORE)
    void insertLikeData(PrettyPaperEntity prettyPaperEntity);

    @Query("select * from table_name where paperlike=:isLike")
    List<PrettyPaperEntity> queryData(boolean isLike);
    @Delete()
    void delete(PrettyPaperEntity prettyPaperEntity);
    @Query("select * from table_name where image=:image")
    PrettyPaperEntity queryimage(String image);
    @Query("delete from table_name where image=:image")
    void deletelike(String image);
}
