Open arthurxavierx opened 3 years ago
Having an eliminator in ToMaybe
akin to Haskell's maybe
would be interesting too, but is it possible to have that for any SqlExpr (Entity e)
?
Btw I can work on this ticket soonish if the maintainers are ok with it.
I think it'd be great if
just
andnothing
worked for anyToMaybe a => a
. We already havejust ≡ toMaybe @(SqlExpr (Value a))
, but no analogous fornothing
exists inToMaybe
. This enhanced version ofToMaybe
would enable us to inject null entities for example.