|
|
@ -7,10 +7,10 @@ import io.legado.app.data.entities.RssArticle |
|
|
|
@Dao |
|
|
|
@Dao |
|
|
|
interface RssArticleDao { |
|
|
|
interface RssArticleDao { |
|
|
|
|
|
|
|
|
|
|
|
@Query("select * from rssArticles where guid = :key") |
|
|
|
@Query("select * from rssArticles where origin = :origin and title = :title") |
|
|
|
fun get(key: String): RssArticle? |
|
|
|
fun get(origin: String, title: String): RssArticle? |
|
|
|
|
|
|
|
|
|
|
|
@Query("select * from rssArticles where origin = :origin order by time desc") |
|
|
|
@Query("select * from rssArticles where origin = :origin order by `order` desc") |
|
|
|
fun liveByOrigin(origin: String): LiveData<List<RssArticle>> |
|
|
|
fun liveByOrigin(origin: String): LiveData<List<RssArticle>> |
|
|
|
|
|
|
|
|
|
|
|
@Insert(onConflict = OnConflictStrategy.IGNORE) |
|
|
|
@Insert(onConflict = OnConflictStrategy.IGNORE) |
|
|
|