RxJava¶
To observe a query, depend on the RxJava extensions artifact and use the extension method it provides:
dependencies {
implementation("app.cash.sqldelight:rxjava3-extensions:2.1.0-SNAPSHOT")
}
dependencies {
implementation "app.cash.sqldelight:rxjava3-extensions:2.1.0-SNAPSHOT"
}
val players: Observable<List<HockeyPlayer>> =
playerQueries.selectAll()
.asObservable()
.mapToList()
Note: For RxJava 2, use rxjava2-extensions
as the artifact name.