Open jkarni opened 8 years ago
I'm not sure what's best as well. What's your opinion, @pseudonom?
I haven't actually investigated if this is possible/non-enormous, but would it make sense to make a version of when_
/case_
that knew about NULL
and Maybe
? So that an expr (Value (Maybe typ))
becomes an expr (Value typ)
in the appropriate branch?
toBaseId
is great, but doesn't really work on e.g. a left inner join, since there's no way of pushing theMaybe
in. It's easy enough to define:For
expr ~ SqlExpr
(it's the same implementation astoBaseId
),. Should I submit a PR for it? It seems a little ugly to have two altogether separate class methods for this...