Fork me on GitHub
#sql
<
2019-10-28
>
Lyn Headley00:10:20

gotcha, thanks

ben14:10:57

I really like the HugSQL approach to SQL, but I find it’s often tedious to put together all the initial CREATE, INSERT, and SELECT queries for all the initial tables. I know here in Clojure-land we Don’t Believe in ORMs:tm: (and I think this pays off), but reducing this tedium is something that I’ve seen ORMs in OO languages do well. Is there an idiomatic approach to this in Clojure?

curtis.summers14:10:39

@ben606 Author of HugSQL here, and I have plenty of code bases where I've used the clojure.java.jdbc/insert! and clojure.java.jdbc/update! functions instead of HugSQL-generated functions. I encourage you and others to know the underlying libraries and use their strengths when it makes sense to do so. And next.jdbc has similar functions: https://github.com/seancorfield/next-jdbc/blob/master/doc/friendly-sql-functions.md

8
ben14:10:26

Thanks Curtis! This looks to be pretty much exactly what I was after. I will have a closer look at jdbc. And thank you for HugSQL! It’s a lovely library 🙂

seancorfield17:10:48

Bear in mind that clojure.java.jdbc is considered "Inactive" at this point -- stable but no longer being maintained (beyond critical fixes) -- and all future effort is being poured into next.jdbc.

👍 4
souenzzo17:10:31

@ben606 checkout #pathom . Not saying that it is a kind of a ORM, but it is a kind of ORM 😅 .

🤯 4
kszabo18:10:08

I would rather call it ARM since it’s really about connecting relations about the Attributes of your system, instead of Objects.