pull/32/head
kunfei 5 years ago
parent b198441e13
commit 1f5de3bd2c
  1. 4
      app/src/main/java/io/legado/app/data/dao/BookChapterDao.kt

@ -1,5 +1,6 @@
package io.legado.app.data.dao
import androidx.paging.DataSource
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
@ -9,6 +10,9 @@ import io.legado.app.data.entities.BookChapter
@Dao
interface BookChapterDao {
@Query("select * from chapters where bookUrl = :bookUrl")
fun observeByBook(bookUrl: String): DataSource.Factory<Int, BookChapter>
@Query("select * from chapters where bookUrl = :bookUrl and `index` = :index")
fun getChapter(bookUrl: String, index: Int): BookChapter?

Loading…
Cancel
Save