Merge pull request #264 from zohrevand/bugfix-populated-queries-not-transactional

Add Transaction annotation to queries with populated return type
pull/267/head
Milosz Moczkowski 2 years ago committed by GitHub
commit 24d107c147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save