Closed DrFriedParts closed 8 years ago
HugSQL tries to support Postgresql type casting with ::
, but this is a bit of an edge case when it is immediately preceded by a :parameter
because of HugSQL's :param-type:param-name
syntax.
HugSQL does support escaping the colon with \:
.
SELECT * FROM "the_table"
WHERE id = :key\:\:bigint
I'll keep looking at this and see if I can build in a work-around.
Support for this has been released in 0.4.5. Please confirm it works for you. Thanks for the report!
This is/should-be valid HugSQL because it is valid PSQL (works correctly in Yesql).
But it will generate
instead of
The work-around is to add whitespace between the cast and the keyword, but it should support the concatenated format, no?