feat: 优化代码

pull/103/head
kunfei 5 years ago
parent 3c203b8403
commit 2bd0c7024d
  1. 5
      app/src/main/java/io/legado/app/data/dao/BookDao.kt

@ -23,12 +23,9 @@ interface BookDao {
@Query("SELECT * FROM books WHERE origin <> '${BookType.local}' and type = 0 order by durChapterTime desc")
fun observeDownload(): LiveData<List<Book>>
@Query("SELECT * FROM books WHERE `group` = :group")
@Query("SELECT * FROM books WHERE (`group` & :group) > 0")
fun observeByGroup(group: Int): LiveData<List<Book>>
@Query("SELECT bookUrl FROM books WHERE `group` = :group")
fun observeUrlsByGroup(group: Int): LiveData<List<String>>
@Query("SELECT * FROM books WHERE name like '%'||:key||'%' or author like '%'||:key||'%'")
fun liveDataSearch(key: String): LiveData<List<Book>>

Loading…
Cancel
Save