From ee0dfd2a24da0cd2a19cb9ca79084dc1612addf8 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 8 Jun 2019 00:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/data/dao/BookSourceDao.kt | 12 ++++++++++++ .../java/io/legado/app/data/dao/ReplaceRuleDao.kt | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/data/dao/BookSourceDao.kt b/app/src/main/java/io/legado/app/data/dao/BookSourceDao.kt index 07f8a4e10..6a46573a7 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookSourceDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookSourceDao.kt @@ -16,6 +16,18 @@ interface BookSourceDao { @Insert(onConflict = OnConflictStrategy.REPLACE) fun insert(bookSource: BookSource): Long + @Insert(onConflict = OnConflictStrategy.REPLACE) + fun insert(vararg bookSource: BookSource) + @Update fun update(bookSource: BookSource) + + @Update + fun update(vararg bookSource: BookSource) + + @Delete + fun delete(bookSource: BookSource) + + @Delete + fun delete(vararg bookSource: BookSource) } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt b/app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt index 530620dc6..f65588378 100644 --- a/app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt @@ -40,7 +40,7 @@ interface ReplaceRuleDao { fun enableAll(enable: Boolean) @Insert(onConflict = OnConflictStrategy.REPLACE) - fun insert(vararg replaceRules: ReplaceRule) + fun insert(vararg replaceRules: ReplaceRule): List @Insert(onConflict = OnConflictStrategy.REPLACE) fun insert(replaceRule: ReplaceRule): Long @@ -48,8 +48,12 @@ interface ReplaceRuleDao { @Update fun update(replaceRules: ReplaceRule) + @Update + fun update(vararg replaceRules: ReplaceRule) + @Delete fun delete(replaceRules: ReplaceRule) - + @Delete + fun delete(vararg replaceRules: ReplaceRule) } \ No newline at end of file