pull/32/head
kunfei 5 years ago
parent 2e54c2cd04
commit 9bb61af770
  1. 9
      app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt

@ -42,6 +42,15 @@ interface ReplaceRuleDao {
) )
fun findEnabledByScope(name: String, origin: String): List<ReplaceRule> fun findEnabledByScope(name: String, origin: String): List<ReplaceRule>
@Query("select `group` from replace_rules")
fun observeGroup(): LiveData<List<String>>
@Query("select * from replace_rules where `group` like '%' || :group || '%'")
fun getByGroup(group: String): List<ReplaceRule>
@get:Query("select * from replace_rules where `group` = null or `group` = ''")
val noGroup: List<ReplaceRule>
@get:Query("SELECT COUNT(*) - SUM(isEnabled) FROM replace_rules") @get:Query("SELECT COUNT(*) - SUM(isEnabled) FROM replace_rules")
val summary: Int val summary: Int

Loading…
Cancel
Save