This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-03
Channels
- # admin-announcements (2)
- # arachne (1)
- # architecture (6)
- # boot (316)
- # cider (7)
- # cljsrn (7)
- # clojure (169)
- # clojure-argentina (3)
- # clojure-belgium (1)
- # clojure-canada (4)
- # clojure-india (1)
- # clojure-russia (39)
- # clojure-spec (27)
- # clojure-uk (55)
- # clojurescript (213)
- # css (1)
- # cursive (20)
- # datavis (2)
- # datomic (52)
- # devcards (3)
- # dirac (78)
- # emacs (20)
- # events (1)
- # funcool (3)
- # hoplon (15)
- # jobs-rus (2)
- # om (57)
- # onyx (82)
- # overtone (1)
- # re-frame (10)
- # reagent (1)
- # ring-swagger (46)
- # spacemacs (7)
- # specter (31)
- # spirituality-ethics (1)
- # sql (43)
- # test-check (1)
- # testing (4)
- # untangled (30)
@sandbags: For me… it’s mostly that I see fairly little difference between writing a bunch of Clojure keywords, and just writing SQL.
Maybe if I was doing more runtime query building, or if portability was a major concern. But neither has happened for any recent use cases.
I just find writing queries directly for HugSQL less clunky than
(sql/build :select :*
:from :foo
:where [:= :f.a "baz”])
@ricardo: i can see your point although I like donaldball’s comment that Honeysql is an AST for the common 90% of SQL and would prefer to manipulate that AST than muck about with appending & subbing strings.
@sandbags: Sure, if you have to do run-time query building, I agree. But for my use cases, query composition through snippets has been more than enough.
Just giving an example of why someone would forgo Honeysql. I feel writing pure SQL is less clunky for 99% of cases, and snippets read very similar to Honeysql when I need something like it.
But I also get tooling and validation when writing SQL queries for HugSQL, which I don’t get with either of the other approaches.
(but this intertwines a number of other psychological factors which may have no bearing on the world of code)
Oh, another thing… When using DB-specific features - say, Postgresql’s full-text search, or JSONB, I found the more abstract approaches fell short, and I had to end up to embedding SQL on the high-level query.
cool, you’ve definitely persuaded me to take a look at the HugSQL approach (thanks for the link)
That grew old fast. It was cleaner to just write the query in pure SQL, then ask HugSQL to make a nice interface to it for me.
i’ve been debating whether to defrecord types for my entities or just live in the world of plain maps
the last time i made this decision (writing a CES) i opted for records as i thought it was “cleaner” and then later walked back on it
Re Kandinski: My tastes run more towards the Gustav Klimt or Giuseppe Arcimboldo, in case you want to read something into that. But that’s getting off-topic. 🙂
I do a lot of query building and HoneySQL has been very nice. I gave a talk on it and did mention that if your use cases aren't dynamic, then HoneySQL probably isn't right for you.