This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-22
Channels
- # 100-days-of-code (1)
- # adventofcode (21)
- # announcements (2)
- # beginners (44)
- # calva (1)
- # cider (2)
- # cljdoc (16)
- # cljs-dev (70)
- # cljsrn (29)
- # clojure (66)
- # clojure-austria (1)
- # clojure-europe (4)
- # clojure-finland (1)
- # clojure-hamburg (1)
- # clojure-italy (24)
- # clojure-nl (3)
- # clojure-uk (127)
- # clojurescript (30)
- # core-typed (3)
- # cursive (34)
- # data-science (2)
- # datomic (16)
- # duct (17)
- # editors (1)
- # emacs (4)
- # figwheel-main (4)
- # fulcro (40)
- # hoplon (2)
- # instaparse (5)
- # kaocha (4)
- # leiningen (1)
- # luminus (4)
- # nrepl (46)
- # off-topic (5)
- # onyx (2)
- # other-languages (55)
- # parinfer (3)
- # protorepl (4)
- # re-frame (33)
- # reagent (6)
- # reitit (13)
- # ring-swagger (5)
- # shadow-cljs (26)
- # spacemacs (4)
- # sql (8)
- # testing (27)
- # tools-deps (21)
- # yada (1)
HugSQL doesn't touch transactions--it just calls clojure.java.jdbc/execute!
for :returning-execute
queries: Operative line here: https://github.com/layerware/hugsql/blob/d0a0c790256a82809d4bd2adac9e812f06962542/hugsql-adapter-clojure-java-jdbc/src/hugsql/adapter/clojure_java_jdbc.clj#L12
This line makes it look like it calls the query
adapter function? https://github.com/layerware/hugsql/blob/d0a0c790256a82809d4bd2adac9e812f06962542/hugsql-core/src/hugsql/core.clj#L238
(which makes no sense to me for an insert)
You're right. I'd have to go remind myself about the details of this, but I'm guessing that it calls clojure.java.jdbc/query
in order to returning a result set for the SQL RETURNING
clause. Can I get the same thing out of clojure.java.jdbc/execute!
? If so, has this always been the case?
I'd have to try it to answer you for sure...
I plan to create a repro of @ccann’s use case above -- but it occurred to me that the rollback may not reset the auto-increment IDs in MySQL so those would just keep incrementing anyway. Probably will try this over the weekend.
Yep, no rush here...Happy Thanksgiving. And thanks for clojure.java.jdbc
!
You're welcome 🙂 I'm working today, but planning to have dinner with friends later. Even after nearly 20 years in the U.S. I still find Thanksgiving weird 🙂