improve message for unlifted JSON usage

Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
Sean Corfield 2024-04-20 10:14:40 -07:00
parent 3b72fefe23
commit 5b04aa28c5
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View file

@ -3,6 +3,7 @@
* 2.6.next in progress
* Address [#527](https://github.com/seancorfield/honeysql/issues/527) by adding tests and more documentation for `:composite`.
* Add example of mixed `DO UPDATE SET` with `EXCLUDED` and regular SQL expressions.
* Improve exception message when un-`lift`-ed JSON expressions are used in the DSL.
* Update Clojure versions (to 1.11.2 and 1.12.0-alpha9); update other dev/test dependencies.
* 2.6.1126 -- 2024-03-04

View file

@ -1576,7 +1576,10 @@
*clause-order*)]
(if (seq leftover)
(throw (ex-info (str "These SQL clauses are unknown or have nil values: "
(str/join ", " (keys leftover)))
(str/join ", " (keys leftover))
"(perhaps you need [:lift {"
(first (keys leftover))
" ...}] here?)")
leftover))
(into [(cond-> (str/join (if pretty "\n" " ") (filter seq sqls))
pretty