package safeluck.drive.evaluation.DB.lightdb; import androidx.lifecycle.LiveData; import androidx.room.Dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.OnConflictStrategy; import androidx.room.Query; import org.jetbrains.annotations.NotNull; import java.util.List; /** * DriveJudge * Created by lzw on 2021/1/14. 09:47:02 * 邮箱:632393724@qq.com * All Rights Saved! Chongqing AnYun Tech co. LTD */ @Dao public interface LightUseQuestionsDao { @Insert(onConflict=OnConflictStrategy.REPLACE) void insertQuestion(LightUseQuestions lightUseQuestions); @Query("Update lightUseQuest set answer=:ans where id=:id") void updateAnswer(int id,String ans); @Insert(onConflict=OnConflictStrategy.REPLACE) void insertAll(List questionsList); @Delete void deleteItem(LightUseQuestions lightUseQuestions); @Query("SELECT * FROM lightUseQuest") LiveData> getLightUseQuestions(); @Query("SELECT * FROM lightUseQuest") List lightUseQuestionsNoLive(); }