Marcin Środa
10/01/2020, 12:47 PMFlow
in Room? Easy queries works fine, but what if I wan’t to use more extended like:
@Query("SELECT id, (SELECT COUNT(id) FROM `message` WHERE channelId = channel.id and timestamp > channel.custom_readAt) as `unreadCount` FROM `channel`")
fun getAll(): Flow<List<UnreadMessageData>>
the new value is not emited. But in DatabaseInspector with ‘live update’ enabled it works fine. Any ideas?Marcin Środa
10/01/2020, 1:44 PM@Query("SELECT COUNT(id) FROM `message` WHERE channelId = :channelId")
fun getUnread(channelId: String): Flow<Int>
Is not working too.Marcin Środa
10/01/2020, 4:40 PM@DatabaseView
, does anyone knows if it’s working with flow?Marcin Środa
10/02/2020, 7:32 AMinsert
is not creating an event adapter. So the only workaround now is to listen on different DAO and map later.