How is it possible to say INSERT ... ON CONFLICT DO NOTHING
?
@somedude314 That's PostgreSQL-specific -- you'll need to use https://github.com/nilenso/honeysql-postgres for that.
I see it has examples of on conflict do nothing in the tests https://github.com/nilenso/honeysql-postgres/blob/feb22bf7a164a23d4dbcffba35c3af4f3e4e38a3/test/honeysql_postgres/postgres_test.cljc#L26-L37
Thanks Sean. I am a little hesitant about leaving the main library just for this.
HoneySQL is about portable, mostly ANSI SQL compliant syntax. PostgreSQL-specific stuff always requires that nilenso library 🙂
It is strictly an extension to HoneySQL -- so you wouldn't be "leaving" the main library, you'd just be "also using" the extensions. Not sure why that worries you @somedude314?
I assume when HoneySQL gets updated, I will have to wait for that library to update HoneySQL version. I will give it a try and see anyhow 🙂
I'm not sure what you mean @somedude314?
You depend on HoneySQL and you depend on the pg-extension library. There's no issue of versions or waiting.
Ah, so you mean I can keep honeysql
listed in my project.clj in addition to nilenso/honeysql-postgres
.
What I did was removing honeysql
as a direct dependency
Why?
Your code still depends on honeysql
so it should be a direct dependency.
cluelessness 🙂
I would recommend always listing all your direct dependencies, with specific versions that you want to use -- and only switching those versions if it causes a specific conflict.
Makes total sense. Will do that. Thanks.