This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-21
Channels
- # adventofcode (27)
- # announcements (2)
- # babashka (1)
- # beginners (111)
- # calva (11)
- # cider (82)
- # clara (6)
- # clojure (44)
- # clojure-dev (5)
- # clojure-europe (27)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (29)
- # core-async (5)
- # cursive (4)
- # datalevin (1)
- # datomic (39)
- # exercism (4)
- # figwheel-main (1)
- # fulcro (32)
- # graalvm (7)
- # gratitude (1)
- # integrant (4)
- # jobs (1)
- # lein-figwheel (3)
- # leiningen (4)
- # lsp (3)
- # luminus (3)
- # meander (2)
- # nextjournal (1)
- # off-topic (10)
- # other-languages (26)
- # pathom (14)
- # polylith (9)
- # re-frame (16)
- # remote-jobs (1)
- # shadow-cljs (4)
- # specter (2)
- # sql (6)
- # timbre (2)
- # tools-build (12)
- # xtdb (9)
I’m using with-options
to pass in default opts. Everything is working fine. I have a feeling that when working with transaction (in tests and special bits of code) that it’s going to be a gotcha remembering to re-apply the options. Seems like the alternative is to wrap the exec* next.jdbc and sql friendly functions and just have them default the options. Anyone else have an approach they like? (to summarize: it’s just a boilerplate and onboarding issue 🤷)
lol sorry, I think I actually see that this is already on Sean’s mind: https://github.com/seancorfield/next-jdbc/issues/172
@tkjone Yeah, I'm seriously regretting ever adding that functionality, TBH. It is a pain to use with transactions, and having a way "add default options" just encourages people to use non-default builders. I wish I'd stood my ground just "forced" people to use the default builder with table-qualified column names.
At work, we use :builder-fn rs/as-unqualified-lower-maps
for calls that need to be compatible with clojure.java.jdbc
code but, otherwise, we try hard to stick to the default builder for new code.
I agree in general. The thing I am doing is adding the snake case defaults so that I can pass lisp-case columns. I mean, I could just as easily just make sure everything is underscored 🤷
Which actually begs the question, do you just use underscored keys across your apps instead of lispcase? Or do you transform them manually after you read and before you write?