|
|
@ -1,10 +1,7 @@ |
|
|
|
package io.legado.app.data.dao |
|
|
|
package io.legado.app.data.dao |
|
|
|
|
|
|
|
|
|
|
|
import androidx.paging.DataSource |
|
|
|
import androidx.paging.DataSource |
|
|
|
import androidx.room.Dao |
|
|
|
import androidx.room.* |
|
|
|
import androidx.room.Insert |
|
|
|
|
|
|
|
import androidx.room.OnConflictStrategy |
|
|
|
|
|
|
|
import androidx.room.Query |
|
|
|
|
|
|
|
import io.legado.app.data.entities.Bookmark |
|
|
|
import io.legado.app.data.entities.Bookmark |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -23,6 +20,9 @@ interface BookmarkDao { |
|
|
|
@Insert(onConflict = OnConflictStrategy.REPLACE) |
|
|
|
@Insert(onConflict = OnConflictStrategy.REPLACE) |
|
|
|
fun insert(vararg bookmark: Bookmark) |
|
|
|
fun insert(vararg bookmark: Bookmark) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Delete |
|
|
|
|
|
|
|
fun delete(vararg bookmark: Bookmark) |
|
|
|
|
|
|
|
|
|
|
|
@Query("delete from bookmarks where bookUrl = :bookUrl and chapterName like '%'||:chapterName||'%'") |
|
|
|
@Query("delete from bookmarks where bookUrl = :bookUrl and chapterName like '%'||:chapterName||'%'") |
|
|
|
fun delByBookmark(bookUrl: String, chapterName: String) |
|
|
|
fun delByBookmark(bookUrl: String, chapterName: String) |
|
|
|
|
|
|
|
|
|
|
|