Add Transaction annotation to queries with populated return type

Change-Id: Ib3c343eec30bd05fb0b0b2f39e52bbff1c1eedf7
pull/264/head
Hasan Zohrevand 2 years ago
parent 55cc13c7a3
commit 33b9457c42

@ -32,6 +32,7 @@ import kotlinx.coroutines.flow.Flow
*/ */
@Dao @Dao
interface EpisodeDao { interface EpisodeDao {
@Transaction
@Query(value = "SELECT * FROM episodes") @Query(value = "SELECT * FROM episodes")
fun getEpisodesStream(): Flow<List<PopulatedEpisode>> fun getEpisodesStream(): Flow<List<PopulatedEpisode>>

@ -34,6 +34,7 @@ import kotlinx.coroutines.flow.Flow
*/ */
@Dao @Dao
interface NewsResourceDao { interface NewsResourceDao {
@Transaction
@Query( @Query(
value = """ value = """
SELECT * FROM news_resources SELECT * FROM news_resources
@ -42,6 +43,7 @@ interface NewsResourceDao {
) )
fun getNewsResourcesStream(): Flow<List<PopulatedNewsResource>> fun getNewsResourcesStream(): Flow<List<PopulatedNewsResource>>
@Transaction
@Query( @Query(
value = """ value = """
SELECT * FROM news_resources SELECT * FROM news_resources

Loading…
Cancel
Save