package com.app.wallpaper.mydao;

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

import java.util.List;

@Dao
public interface InterfaceDao {
    @Insert
    void insert(MyEntity myEntity);

    @Query("SELECT * FROM table_image_url")
    List<MyEntity> getAllImages();

    @Query("SELECT * FROM table_image_url where imagePre =:url")
    MyEntity getImagePre(String url);

    @Query("SELECT * FROM table_image_url where imageSou =:url")
    MyEntity getImageSou(String url);

    @Delete
    void deleteUser(MyEntity favoriteImage);
}
