setNx returns Unit
Closed this issue · 4 comments
Twizty commented
Why does setNx returns Unit? I want to know the result of my query but with this API it seems impossible.
gvolpe commented
There are a bunch of methods defined this way where we discard the Java result as in most cases they are irrelevant. Eg. set
returns a simple String "OK" in the Java API but we just represent it as F[Unit]
.
If having F[Boolean]
would make you happy we can make that change :) Wanna work on this small PR?
And to be consistent all the *setNx
methods need to change to F[Boolean]
.
Twizty commented
Sure, I'd love to work on this!