ITADN

Evaluation `[:= ... nil]` to `... IS NULL` is unintuitive

#593Closedchristophe-riolo 创建于 2025-10-28
documentation
Hello, The following code evaluates as such ``` user=> (require '[honey.sql :as h]) user=> (h/format {:where [:= :foo nil]}) ["WHERE foo IS NULL"] ``` This bit us today as we were expecting the produced value to be `[WHERE foo = NULL]`, so that the test would be false when the `foo`column is false. The change of semantics of `:=` from `=` to `IS`, which is different at least in Postgresql, should at least be listed as a caveat, but I think it's more of a bug than a feature ? Honeysql version 2.7.1350
关闭于 2025-10-28 4 条评论