Fork me on GitHub
#announcements
<
2022-12-18
>
seancorfield00:12:37

HoneySQL -- Turn Clojure data structures into SQL -- com.github.seancorfield/honeysql {:mvn/version "2.4.962"} -- https://github.com/seancorfield/honeysql -- the "big ticket" item is #405: the long-requested ability to generate SQL with numbered placeholders (`$1`, $2, etc) instead of positional placeholders (`?`) which means you can now use HoneySQL with the Node.js PostgreSQL driver! The release also contains a number of bug fixes: • Fix set-options! (only :checking worked in 2.4.947). • Fix :cast formatting when quoting is enabled, via PR https://github.com/seancorfield/honeysql/pull/443 https://github.com/duddlf23. • Fix https://github.com/seancorfield/honeysql/issues/441 by adding :replace-into to in-flight clause order (as well as registering it for the :mysql dialect). • Fix https://github.com/seancorfield/honeysql/issues/434 by special-casing :'ARRAY. • Fix https://github.com/seancorfield/honeysql/issues/433 by supporting additional WITH syntax, via PR https://github.com/seancorfield/honeysql/issues/432, https://github.com/MawiraIke. [Technically, this was in 2.4.947, but I kept the issue open while I wordsmithed the documentation] • Address https://github.com/seancorfield/honeysql/issues/405 by adding :numbered option, which can also be set globally using set-options!. Follow-up in #honeysql

🍯 23
clojure-spin 9
🙌 1
👏 1
borkdude10:12:06

Works with #C029PTWD3HR :

$ nbb -e "(require 'honey.sql) (honey.sql/format {:select :* :from :table :where [[:= :x 2]]} {:numbered true})"
["SELECT * FROM table WHERE (x = $1)" 2]
I'm sure a couple of people will be happy with this in nbb :)

1
1
jaide18:12:45

@U04V15CAJ Exactly! All the node pg adapters used that format so this opens sooo many doors 🚪