endian11
2021-02-03 225473d256d26d4d8f9469038d02d28ac1c866be
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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();
}