package com.fun.originalityprank.data;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import java.util.List;

@Dao
public interface LikeDAO {
    @Query("SELECT * FROM prank_table")
    List<AllData> getAll();

    @Query("select * from prank_table where islike =:islike ")
    List<AllData> getLikedata(boolean islike);

    @Query("select * from prank_table where title =:title ")
    List<AllData> getliketitle(String title);
    @Query("select * from prank_table where categoryname =:name ")
    List<AllData> getlist(String name);

    @Insert
    void insertAll(List<AllData> likeDataList);


    @Query("DELETE FROM prank_table WHERE title = :title")
    void deleteByTitle(String title);
    @Update
    void update(AllData likeData);
}
