Fix id conflict in feedsWithoutFolder query

This commit is contained in:
Shinokuni 2023-08-27 22:34:53 +02:00
parent 5a6a6d4b23
commit 413dba4db5
1 changed files with 1 additions and 1 deletions

View File

@ -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")
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")
abstract fun selectFeedsWithoutFolder(accountId: Int): Flow<List<FeedWithCount>>