package safeluck.drive.evaluation.DB.exam_status; 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 java.util.List; @Dao public interface ExamStatusDao { @Insert(onConflict = OnConflictStrategy.REPLACE) void insert(ExamStatus examStatus); @Query("Select * from exam_status") LiveData> getExamStatus(); @Query("update exam_status set enter =:enter where map_id =:mapid") void updateEnter(int enter,int mapid); @Query("update exam_status set result =:result where map_id =:mapid") void updateItemResult(int result,int mapid); @Query("update exam_status set startExam =:startexam") void updateStartExam(int startexam); @Query("select startExam from exam_status where map_id=-1") LiveData getStartExam(); @Query("select startExam from exam_status where map_id=-1") int getStartExamInt(); @Query("delete from exam_status where map_id >-1") void deleteAll(); }