Skip Navigation

Is it overkill to use RxJava and Arrow for a room database query return?

I'm new to using reactive and functional programming in kotlin with libraries. I'm maintaining a project at my company that uses only .orNull() from the arrow.core.Option class.

My question is: why is the project returning the first type instead of the second one?

Single<Option<UserEntity>>
Single<UserEntity?>

Can't the DAO object return a null type if it doesn't find the object on a query such as SELECT * FROM users WHERE id = 1 ?

1

You're viewing a single thread.

1 comments