This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-10
Channels
- # announcements (1)
- # babashka (44)
- # beginners (188)
- # calva (37)
- # chlorine-clover (28)
- # cider (12)
- # clj-kondo (40)
- # clojars (1)
- # clojure (323)
- # clojure-austin (7)
- # clojure-europe (20)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-spec (7)
- # clojure-uk (37)
- # clojuredesign-podcast (1)
- # clojurescript (30)
- # cryogen (2)
- # cursive (30)
- # data-science (1)
- # datomic (26)
- # emacs (1)
- # events (1)
- # figwheel-main (13)
- # fulcro (89)
- # garden (1)
- # graalvm (20)
- # graphql (8)
- # jobs (1)
- # jobs-discuss (1)
- # joker (6)
- # kaocha (125)
- # lambdaisland (1)
- # meander (42)
- # off-topic (18)
- # pathom (3)
- # pedestal (6)
- # shadow-cljs (55)
- # spacemacs (21)
- # sql (18)
- # tools-deps (8)
- # uncomplicate (2)
- # vim (1)
- # yada (3)
@seancorfield as far as I understand binding
and with-redefs
it should work for with-redefs
even more, because it works also for Thread
#object[org.postgresql.jdbc.PgConnection 0x5f7b586a org.postgresql.jdbc.PgConnection@5f7b586a]
(with-redefs [db-psql/db tx]
(println db-psql/db)
(tests))
this even show different value for db
than original(defn insert! [& args]
(println "!!!!!!" db)
(apply sql/insert! db args))
but it works with defn
(def a 1)
(def b (partial println "!" a "!"))
(with-redefs [a 2]
(b a))
this print ! 1 ! 2
About qualified/unqualified keys, checkout https://github.com/souenzzo/eql-as I'm using it on every project that I work It solves both qualified->unqualified and un->qualified
👍 4