Update database

pull/11/head
atbest 6 years ago
parent b40f9de603
commit 09a47d4b15
  1. 19
      app/src/main/java/io/legado/app/data/dao/BookDao.kt

@ -0,0 +1,19 @@
package io.legado.app.data.dao
import androidx.lifecycle.LiveData
import androidx.paging.DataSource
import androidx.room.Dao
import androidx.room.Query
import io.legado.app.data.entities.Book
@Dao
interface BookDao {
@Query("SELECT * FROM books WHERE `group` = :group")
fun observeByGroup(group: Int): DataSource.Factory<Int, Book>
@Query("SELECT url FROM books WHERE `group` = :group")
fun observeUrlsByGroup(group: Int): LiveData<List<String>>
}
Loading…
Cancel
Save