pull/32/head
kunfei 5 years ago
parent 79f3b4f5a9
commit 8c3e612dfd
  1. 12
      app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt

@ -11,12 +11,6 @@ import io.legado.app.data.entities.SearchShow
@Dao @Dao
interface SearchBookDao { interface SearchBookDao {
@Query("SELECT * FROM searchBooks")
fun observeAll(): DataSource.Factory<Int, SearchBook>
@Query("SELECT * FROM searchBooks where time >= :time")
fun observeNew(time: Long): DataSource.Factory<Int, SearchBook>
@Query( @Query(
""" """
SELECT name, author, min(time) time, max(kind) kind, max(coverUrl) coverUrl,max(intro) intro, max(wordCount) wordCount, SELECT name, author, min(time) time, max(kind) kind, max(coverUrl) coverUrl,max(intro) intro, max(wordCount) wordCount,
@ -28,6 +22,12 @@ interface SearchBookDao {
) )
fun observeShow(key: String, time: Long): DataSource.Factory<Int, SearchShow> fun observeShow(key: String, time: Long): DataSource.Factory<Int, SearchShow>
@Query("SELECT * FROM searchBooks")
fun observeAll(): DataSource.Factory<Int, SearchBook>
@Query("SELECT * FROM searchBooks where time >= :time")
fun observeNew(time: Long): DataSource.Factory<Int, SearchBook>
@Query("select * from searchBooks where bookUrl = :bookUrl") @Query("select * from searchBooks where bookUrl = :bookUrl")
fun getSearchBook(bookUrl: String): SearchBook? fun getSearchBook(bookUrl: String): SearchBook?

Loading…
Cancel
Save