feat: 优化代码

pull/106/head
kunfei 5 years ago
parent e9496526c2
commit 2271e04d82
  1. 4
      app/src/main/java/io/legado/app/data/dao/ReplaceRuleDao.kt

@ -34,13 +34,13 @@ interface ReplaceRuleDao {
@Query(
"""SELECT * FROM replace_rules WHERE isEnabled = 1
AND (scope LIKE '%' || :scope || '%' or scope = null or scope = '')"""
AND (scope LIKE '%' || :scope || '%' or scope is null or scope = '')"""
)
fun findEnabledByScope(scope: String): List<ReplaceRule>
@Query(
"""SELECT * FROM replace_rules WHERE isEnabled = 1
AND (scope LIKE '%' || :name || '%' or scope LIKE '%' || :origin || '%' or scope = null or scope = '')"""
AND (scope LIKE '%' || :name || '%' or scope LIKE '%' || :origin || '%' or scope is null or scope = '')"""
)
fun findEnabledByScope(name: String, origin: String): List<ReplaceRule>

Loading…
Cancel
Save