cloudroam
2025-02-21 2167ea58d1c297b0536d5cab6517707f1892b95f
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
package com.example.firstapp.database.dao
 
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.example.firstapp.database.entity.KeywordConfig
import com.example.firstapp.database.entity.KeywordEntity
 
@Dao
interface KeywordDao {
    @Query("SELECT * FROM keywords")
     fun getAllKeywords(): List<KeywordEntity>
 
//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    suspend fun insertAll(keywords: List<KeywordEntity>)
//
//    @Query("DELETE FROM keywords")
//    suspend fun deleteAll()
//
//    @Update
//    suspend fun update(keyword: KeywordEntity)
//
//    @Query("SELECT * FROM keywords WHERE isEnabled = 1")
//     fun getEnabledKeywords(): List<KeywordConfig>
}