Join Slack
Powered by
Or, I can use a Maybe<User> stream which wi...
# rx
a
ashishkrishnan
06/05/2018, 8:08 AM
Or, I can use a Maybe<User> stream which will call onComplete() if user is not present. if that's the case, I can have a switchIfEmpty() to create one.
Copy code
userDao .getUserMaybe(id) .switchIfEmpty( ........... userDao.insert() )
Which one would be better?
Open in Slack
Previous
Next