diff --git a/app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt b/app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt index 2032c46e8..5d928c42a 100644 --- a/app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt @@ -11,12 +11,6 @@ import io.legado.app.data.entities.SearchShow @Dao interface SearchBookDao { - @Query("SELECT * FROM searchBooks") - fun observeAll(): DataSource.Factory - - @Query("SELECT * FROM searchBooks where time >= :time") - fun observeNew(time: Long): DataSource.Factory - @Query( """ 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 + @Query("SELECT * FROM searchBooks") + fun observeAll(): DataSource.Factory + + @Query("SELECT * FROM searchBooks where time >= :time") + fun observeNew(time: Long): DataSource.Factory + @Query("select * from searchBooks where bookUrl = :bookUrl") fun getSearchBook(bookUrl: String): SearchBook?