This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-28
Channels
- # announcements (2)
- # babashka (16)
- # bangalore-clj (1)
- # beginners (93)
- # boot (11)
- # calva (5)
- # cider (13)
- # clj-kondo (49)
- # cljdoc (14)
- # cljs-dev (1)
- # clojure (99)
- # clojure-dev (3)
- # clojure-europe (1)
- # clojure-india (1)
- # clojure-italy (9)
- # clojure-nl (3)
- # clojure-poland (1)
- # clojure-russia (1)
- # clojure-spec (31)
- # clojure-uk (21)
- # clojured (2)
- # clojurescript (18)
- # core-async (12)
- # cursive (36)
- # data-science (1)
- # datomic (54)
- # duct (3)
- # emacs (33)
- # events (1)
- # fulcro (17)
- # jobs (1)
- # joker (8)
- # keechma (1)
- # leiningen (7)
- # malli (8)
- # nrepl (19)
- # pathom (6)
- # planck (18)
- # re-frame (20)
- # reagent (18)
- # shadow-cljs (3)
- # sql (7)
- # vim (31)
gotcha, thanks
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?
@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
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 🙂
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
.
@ben606 checkout #pathom . Not saying that it is a kind of a ORM, but it is a kind of ORM 😅 .
I would rather call it ARM since it’s really about connecting relations about the Attributes of your system, instead of Objects.
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
.