mirror of https://github.com/readrops/Readrops.git
Fix id conflict in feedsWithoutFolder query
This commit is contained in:
parent
5a6a6d4b23
commit
413dba4db5
|
@ -21,7 +21,7 @@ abstract class NewFeedDao : NewBaseDao<Feed> {
|
||||||
@Query("Select case When :feedUrl In (Select url from Feed Where account_id = :accountId) Then 1 else 0 end")
|
@Query("Select case When :feedUrl In (Select url from Feed Where account_id = :accountId) Then 1 else 0 end")
|
||||||
abstract suspend fun feedExists(feedUrl: String, accountId: Int): Boolean
|
abstract suspend fun feedExists(feedUrl: String, accountId: Int): Boolean
|
||||||
|
|
||||||
@Query("Select *, count(*) as unreadCount From Feed Inner Join Item On Feed.id = Item.feed_id " +
|
@Query("Select Feed.*, count(*) as unreadCount From Feed Inner Join Item On Feed.id = Item.feed_id " +
|
||||||
"Where Feed.folder_id is Null And Item.read = 0 And Feed.account_id = :accountId Group by Feed.id")
|
"Where Feed.folder_id is Null And Item.read = 0 And Feed.account_id = :accountId Group by Feed.id")
|
||||||
abstract fun selectFeedsWithoutFolder(accountId: Int): Flow<List<FeedWithCount>>
|
abstract fun selectFeedsWithoutFolder(accountId: Int): Flow<List<FeedWithCount>>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue