package com.example.mynotepad.MenuFeatures.AllNotes.DataBase;

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

import java.util.List;

@Dao
public interface PicsDao {
    // a method list type
    @Query("SELECT * FROM PicsEntity")
    List<PicsEntity> getAllPicsNotes();

    //insert data in database
    @Insert
    void insertPicsNote(PicsEntity picsEntity);

    //delete data in database
    @Delete
    void deletePicsNote(PicsEntity picsEntity);

    //update data
    @Query("UPDATE PicsEntity SET txt = :txt , url = :url ")
    void updateDate(String txt , String url);
}
