package safeluck.drive.evaluation.DB.lightdb;
|
|
import androidx.lifecycle.LiveData;
|
import androidx.room.Dao;
|
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 LightAllAnswerDao {
|
@Insert(onConflict=OnConflictStrategy.REPLACE)
|
void insertQuestion(LightAnswers lightAnswers);
|
|
@Insert(onConflict=OnConflictStrategy.REPLACE)
|
void insertAll(List<LightAnswers> answersList);
|
|
@Query("SELECT * from light_all_answers where question_id=:question_id")
|
List<LightAnswers> getCurrQuest2Answers(int question_id);
|
|
@Query("UPDATE light_all_answers SET choose =:flag WHERE id = :id")
|
void updateAnswerChoose(int id, int flag);
|
|
@Query("SELECT * from light_all_answers ")
|
LiveData<List<LightAnswers>> getAllAnswers();
|
}
|