package com.app.paintingstool.mydao;

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

import java.util.List;

@Dao
public interface FavoriteImageDao {
    @Insert
    void insert(FavoriteImage image);

    @Delete
    void delete(FavoriteImage image);

    @Query("SELECT * FROM favorite_images WHERE image_url = :url")
    FavoriteImage findByUrl(String url);

    @Query("SELECT * FROM favorite_images")
    List<FavoriteImage> getAllImages();

}