pull/32/head
kunfei 5 years ago
parent a6b5de1b7a
commit be3b85a3d9
  1. 9
      app/src/main/java/io/legado/app/data/dao/BookSourceDao.kt
  2. 3
      app/src/main/java/io/legado/app/data/dao/SearchBookDao.kt

@ -34,21 +34,12 @@ interface BookSourceDao {
@Query("select count(*) from book_sources") @Query("select count(*) from book_sources")
fun allCount(): Int fun allCount(): Int
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(bookSource: BookSource): Long
@Insert(onConflict = OnConflictStrategy.REPLACE) @Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(vararg bookSource: BookSource) fun insert(vararg bookSource: BookSource)
@Update
fun update(bookSource: BookSource)
@Update @Update
fun update(vararg bookSource: BookSource) fun update(vararg bookSource: BookSource)
@Delete
fun delete(bookSource: BookSource)
@Delete @Delete
fun delete(vararg bookSource: BookSource) fun delete(vararg bookSource: BookSource)

@ -29,6 +29,9 @@ interface SearchBookDao {
@Query("select * from searchBooks where name = :name and author = :author order by originOrder") @Query("select * from searchBooks where name = :name and author = :author order by originOrder")
fun getByNameAuthor(name: String, author: String): List<SearchBook> fun getByNameAuthor(name: String, author: String): List<SearchBook>
@Query("select * from searchBooks where name = :name and author = :author order by originOrder")
fun getByNameAuthorEnable(name: String, author: String): List<SearchBook>
@Insert(onConflict = OnConflictStrategy.REPLACE) @Insert(onConflict = OnConflictStrategy.REPLACE)
fun insert(vararg searchBook: SearchBook): List<Long> fun insert(vararg searchBook: SearchBook): List<Long>

Loading…
Cancel
Save