package xn.hxp.room.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import xn.hxp.room.bean.DeviceInfo;

@Dao
public interface DeviceInfoDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(DeviceInfo deviceInfo);

    @Query("SELECT * FROM deviceinfo")
    DeviceInfo getDeviceInfo();

    @Update
    void update(DeviceInfo deviceInfo);

    @Delete
    void delete(DeviceInfo deviceInfo);

    @Query("DELETE FROM deviceInfo")
    void deleteAll();
}
