Open guaraqe opened 1 year ago
The problem is the casting around each one of the parameters. If there was a way to avoid it, it would be possible to apply the strategy here: https://github.com/tomjaguarpaw/haskell-opaleye/issues/291
If there is interest, I can add a function that does it, maybe just for EXTRACT
.
The
EXTRACT
function has a weird syntax, for example:I tried using
function
to write it, but it ends up withCAST
s in places that create syntax errors, namely aroundEPOCH FROM
:Is there any way to use a
DBType
that has no casts around it, or some other technique to make it work? The syntax is similar toCAST
, but I see no definition of it in the library. I cannot see neither how to useunsafeLiteral
to write it.