RxRoom
-
android
open class RxRoom
Summary
Public companion functions |
||
|---|---|---|
Flowable<Any> |
createFlowable(database: RoomDatabase, vararg tableNames: String)Creates a |
android
|
Observable<Any> |
createObservable(database: RoomDatabase, vararg tableNames: String)Creates a |
android
|
Public companion properties |
||
|---|---|---|
Any |
Data dispatched by the publisher created by |
android
|
Public constructors |
|
|---|---|
This function is deprecated. This type should not be instantiated as it contains only utility functions. |
android
|
Public companion functions
createFlowable
fun createFlowable(database: RoomDatabase, vararg tableNames: String): Flowable<Any>
Creates a Flowable that emits at least once and also re-emits whenever one of the observed tables is updated.
You can easily chain a database operation to downstream of this Flowable to ensure that it re-runs when database is modified.
Since database invalidation is batched, multiple changes in the database may results in just 1 emission.
| Parameters | |
|---|---|
database: RoomDatabase |
The database instance |
vararg tableNames: String |
The list of table names that should be observed |
createObservable
fun createObservable(database: RoomDatabase, vararg tableNames: String): Observable<Any>
Creates a Observable that emits at least once and also re-emits whenever one of the observed tables is updated.
You can easily chain a database operation to downstream of this Observable to ensure that it re-runs when database is modified.
Since database invalidation is batched, multiple changes in the database may results in just 1 emission.
| Parameters | |
|---|---|
database: RoomDatabase |
The database instance |
vararg tableNames: String |
The list of table names that should be observed |
| Returns | |
|---|---|
Observable<Any> |
A |