package com.apps.sketchmaster.data

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

@Dao
interface BaseDao {
    @Insert(onConflict = OnConflictStrategy.IGNORE)
    suspend fun insert(base: Base)

    @Query("SELECT * FROM base")
    suspend fun getAll(): List<Base>

    @Query("SELECT * FROM base WHERE url=:path")
    suspend fun selectByPath(path: String): Base?

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