package com.apps.quicksketchtrace.database

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface LocalDao {
    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insert(local: Local)

    @Query("SELECT * FROM local")
    suspend fun getAll(): List<Local>

    @Query("SELECT * FROM local WHERE path=:path")
    suspend fun selectByPath(path: String): Local?

    @Query("DELETE FROM local WHERE path=:path")
    suspend fun deleteByPath(path: String)
}