package com.framework.mvvm.model.db.dao

import androidx.room.*
import com.framework.mvvm.model.db.entity.PipeConfigEntity

/**
 * 表 pipe_config Dao
 */
@Dao
interface PipeConfigDao {
    @Query("select * from pipe_config")
    suspend fun getConfigs(): List<PipeConfigEntity>

    @Query("select * from pipe_config where id = :id")
    suspend fun getConfigById(id: String): PipeConfigEntity

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insConfig(vararg config: PipeConfigEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insConfigs(configs: List<PipeConfigEntity>)

    @Delete
    suspend fun delConfig(config: PipeConfigEntity)
}