hugsql

curtis.summers 2018-10-24T00:13:44.000100Z

Can you try when, which returns nil for the false case: --~ (when (:min-value params) "MINVALUE :sql:min-value")

roklenarcic 2018-10-24T07:44:37.000100Z

I'll try

roklenarcic 2018-10-24T07:49:52.000100Z

Yes, returning nil works, thanks.

roklenarcic 2018-10-24T08:37:59.000100Z

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.

curtis.summers 2018-10-24T12:43:42.000100Z

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

💯 1