package com.gh.gamecenter.room.dao

import androidx.room.*
import com.gh.gamecenter.video.upload.UploadEntity

@Dao
interface UploadDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addUpload(upload: UploadEntity)

    @Query("select * from UploadEntity where uploadFilePath = :uploadFilePath")
    fun getUploadByFilePath(uploadFilePath: String): UploadEntity?

    @Query("delete from UploadEntity WHERE uploadFilePath = :uploadFilePath")
    fun deleteUploadByPath(uploadFilePath: String)
}