Fork me on GitHub
#honeysql
<
2022-08-23
>
steven kent18:08:12

Hi, in honeysql 1.0.461, does :except get converted to minus in an Oracle 18 context? Thank you

seancorfield19:08:37

HoneySQL 1.x knows nothing about dialects so if it supports :except at all it would always produce EXCEPT -- but I don't think it supports that?

seancorfield19:08:40

Ah, yeah, looks like :except support was added in 0.9.10 back in March 2020. And it's a pretty simple formatter:

(defmethod format-clause :except [[_ maps] _]
  (binding [*subquery?* false]
    (string/join " EXCEPT " (map to-sql maps))))

seancorfield19:08:44

Are you getting some strange behavior?

steven kent20:08:55

No sir, this was just a question that came up. I looked at this line, trying to answer it https://github.com/seancorfield/honeysql/blob/v1/src/honeysql/helpers.cljc#L381 but apparently that isn't the same place you pointed out

seancorfield22:08:46

Ah, yes, the build-clause stuff is how the helpers were handled in v1, and they build a data structure -- nothing more -- which is then turned into SQL via format-clause which is what I linked to.