Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RoomRepository(
- private val database: RoomDatabase //actual room database
- ): Repository {
- override fun getFooByType(type: Int): Maybe<List<Item>> {
- return database.fooDao()
- .getFooByType(type)
- .map { names ->
- names.map { name -> Item(name) }
- }
- .subscribeOn(Schedulers.io())
- }
- }
Add Comment
Please, Sign In to add comment