Fork me on GitHub
#sql
<
2022-11-21
>
ivana11:11:10

Hello! My current project uses clojure jdbc 1-st version. But I'm creating some extra migration code and looks like I may use clojure jdbc next (if it solves my promlem easy). I need a trivial thing - upsert-multi! (for Postgres). For the first look I didn't fint it either in 1-st nor in next versions. What do you suggest - fighting with execute in first one or in second one? PS Postgres latest 15 with all features support

seancorfield18:11:49

upsert is DB-specific so you'd either need to write the SQL yourself or use HoneySQL to generate it. See https://cljdoc.org/d/com.github.seancorfield/honeysql/2.4.947/doc/getting-started/postgresql-support#upsert for examples of PostgreSQL-specific stuff that is supported.

1
ivana21:11:40

Thanks, I'll check it!