# androidx.room.rxjava3

# androidx.room.rxjava3

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/room/rxjava3/package-summary "View this page in Java")

## Exceptions

|-------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EmptyResultSetException](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/EmptyResultSetException) | Thrown by Room when the query in a[io.reactivex.rxjava3.core.Single](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Single.html)DAO method needs to return a result but the returned result from the database is empty. |

## Top-level functions summary

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Flowable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`>`     | [createFlowable](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#createFlowable(androidx.room.RoomDatabase,kotlin.Array))`(database: `[RoomDatabase](https://developer.android.com/reference/kotlin/androidx/room/RoomDatabase)`, vararg tableNames: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Creates a[Flowable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)that emits at least once and also re-emits whenever one of the observed tables is updated.         |
| [Observable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`>` | [createObservable](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#createObservable(androidx.room.RoomDatabase,kotlin.Array))`(database: `[RoomDatabase](https://developer.android.com/reference/kotlin/androidx/room/RoomDatabase)`, vararg tableNames: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`)` Creates a[Observable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)that emits at least once and also re-emits whenever one of the observed tables is updated. |

## Top-level properties summary

|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) | [NOTHING](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#NOTHING()) Data dispatched by the publisher created by[createFlowable](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#createFlowable(androidx.room.RoomDatabase,kotlin.Boolean,kotlin.Array,kotlin.Function1)). |

## Top-level functions

### createFlowable

Artifact:[androidx.room:room-rxjava3](https://developer.android.com/jetpack/androidx/releases/room)  
[View Source](https://cs.android.com/search?q=file:androidx/room/rxjava3/RxRoom.kt+function:createFlowable)  
Added in[2.3.0](https://developer.android.com/jetpack/androidx/releases/room#2.3.0)  

```
fun createFlowable(database: RoomDatabase, vararg tableNames: String): Flowable<Any>
```

Creates a[Flowable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)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](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)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](https://developer.android.com/reference/kotlin/androidx/room/RoomDatabase)  | The database instance                           |
| `vararg tableNames: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | The list of table names that should be observed |

|                                                                                   Returns                                                                                   |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Flowable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`>` | A[Flowable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html)which emits[NOTHING](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#NOTHING())when one of the observed tables is modified (also once when the invalidation tracker connection is established). |

### createObservable

Artifact:[androidx.room:room-rxjava3](https://developer.android.com/jetpack/androidx/releases/room)  
[View Source](https://cs.android.com/search?q=file:androidx/room/rxjava3/RxRoom.kt+function:createObservable)  
Added in[2.3.0](https://developer.android.com/jetpack/androidx/releases/room#2.3.0)  

```
fun createObservable(database: RoomDatabase, vararg tableNames: String): Observable<Any>
```

Creates a[Observable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)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](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)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](https://developer.android.com/reference/kotlin/androidx/room/RoomDatabase)  | The database instance                           |
| `vararg tableNames: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) | The list of table names that should be observed |

|                                                                                     Returns                                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Observable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)`<`[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`>` | A[Observable](http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Observable.html)which emits[NOTHING](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#NOTHING())when one of the observed tables is modified (also once when the invalidation tracker connection is established). |

## Top-level properties

### NOTHING

Artifact:[androidx.room:room-rxjava3](https://developer.android.com/jetpack/androidx/releases/room)  
[View Source](https://cs.android.com/search?q=file:androidx/room/rxjava3/RxRoom.kt+symbol:NOTHING)  
Added in[2.3.0](https://developer.android.com/jetpack/androidx/releases/room#2.3.0)  

```
val NOTHING: Any
```

Data dispatched by the publisher created by[createFlowable](https://developer.android.com/reference/kotlin/androidx/room/rxjava3/package-summary#createFlowable(androidx.room.RoomDatabase,kotlin.Boolean,kotlin.Array,kotlin.Function1)).