Skip to content

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.0.2")
}
dependencies {
  implementation "app.cash.sqldelight:rxjava3-extensions:2.0.2"
}
val players: Observable<List<HockeyPlayer>> = 
  playerQueries.selectAll()
    .asObservable()
    .mapToList()

Note: For RxJava 2, use rxjava2-extensions as the artifact name.