Back to Sqldelight

Coroutines Usage

docs/common/coroutines-usage.md

2.3.2233 B
Original Source
kotlin
val players: Flow<List<HockeyPlayer>> = 
  playerQueries.selectAll()
    .asFlow()
    .mapToList(Dispatchers.IO)

This flow emits the query result, and emits a new result every time the database changes for that query.