package com.haven.wallpapers.room;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.haven.wallpapers.jsonbean.Data;

import java.util.List;

@Dao
public interface LikeDao {
    @Query("SELECT * FROM collection")
    List<Data> getAllTasks();
    @Query("SELECT * FROM collection WHERE imId = :imId")
    Data getTaskByUrl(String imId);
    @Query("DELETE FROM collection WHERE imId = :imId")
    void deleteTaskByUrl(String imId);
    @Insert(onConflict = OnConflictStrategy.IGNORE)
    void insertTask(Data task);
    @Update
    void updateTask(Data task);
}
