Skip to content

RxJava

To observe a query, depend on the RxJava extensions artifact and use the extension method it provides:

dependencies {
  implementation "com.squareup.sqldelight:rxjava3-extensions:1.5.4"
}
val players: Observable<List<HockeyPlayer>> = 
  playerQueries.selectAll()
    .asObservable()
    .mapToList()

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