Can you try when
, which returns nil for the false case: --~ (when (:min-value params) "MINVALUE :sql:min-value")
I'll try
Yes, returning nil works, thanks.
How do I prevent hugsql from using dot .
following a parameter declaration? For instance when selecting next sequence value I have this SELECT :i:sequence-name.nextval from dual
. Here hugsql takes sequence-name.nextval
to be the parameter, but actually I only want sequence-name
to be the parameter.
This is an edge case that ends up conflicting with HugSQL's deep-get param names. But, you can make the parser "jump out" of the param by putting the param part in a Clojure expression: SELECT /*~ ":i:sequence-name" ~*/.nextval from dual