Why defining Flowable I could receive updates of the DB

Viewed 137
 @Query("SELECT * FROM userdata")
 Flowable<List<UserData>> allUserDatas();

@Insert(onConflict = OnConflictStrategy.REPLACE)
List<Long> insert(List<UserData> datas);


userDao.allUserDatas()
take(1).
filter(....)
    .subscribeOn(io())
    .observeOn(mainThread())
    .subscribe(userDatas -> Log.i("TAG",""+userDatas));

I added fetching with subscription in the same fragment in onAttach() but after DB update it doesn't call the subscription of fetching from DB, why

2 Answers
Related