From cf9bc941487df8dfb0780d3e8f1281f4e397b5fa Mon Sep 17 00:00:00 2001
From: cloudroam <cloudroam>
Date: 星期四, 06 三月 2025 10:33:57 +0800
Subject: [PATCH] fix: 3

---
 app/src/main/java/com/example/firstapp/database/dao/KeywordDao.kt |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/app/src/main/java/com/example/firstapp/database/dao/KeywordDao.kt b/app/src/main/java/com/example/firstapp/database/dao/KeywordDao.kt
index f4011d5..81a54e1 100644
--- a/app/src/main/java/com/example/firstapp/database/dao/KeywordDao.kt
+++ b/app/src/main/java/com/example/firstapp/database/dao/KeywordDao.kt
@@ -8,20 +8,30 @@
 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>
-
+//@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>
-}
+////
+////    @Query("DELETE FROM keywords")
+////    suspend fun deleteAll()
+////
+////    @Update
+////    suspend fun update(keyword: KeywordEntity)
+////
+////    @Query("SELECT * FROM keywords WHERE isEnabled = 1")
+////     fun getEnabledKeywords(): List<KeywordConfig>
+//}
+@Dao
+interface KeywordDao {
+    @Insert(onConflict = OnConflictStrategy.REPLACE)
+     fun insertAll(keywords: List<KeywordEntity>)
+
+    @Query("SELECT * FROM keywords")
+     fun getAllKeywords(): List<KeywordEntity>
+}
\ No newline at end of file

--
Gitblit v1.9.3