package com.jld.vod.dao

import androidx.paging.DataSource
import androidx.room.*
import com.jld.vod.model.bean.BrowserBean
import com.jld.vod.model.bean.CarInfoBean


/**
 * @author ZhaoFuXin
 * @Email：18276061387@163.com
 * @description:
 * @date :2019/11/28 15:31
 */
@Dao
interface CarInfoDao {
    @Insert
    fun insertAll(vararg users: CarInfoBean)

    @Query("SELECT * FROM CarInfoBean")
    fun getAll(): List<CarInfoBean>

    /**
     * 获取所有设备给paging使用
     */
    @Query("SELECT * FROM CarInfoBean")
    fun getAlls(): DataSource.Factory<Int, CarInfoBean>

    @Query(" DELETE FROM CarInfoBean")
    fun delete()
}