This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-25
Channels
- # admin-announcements (3)
- # alda (2)
- # beginners (10)
- # boot (44)
- # cider (31)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (17)
- # clojure (181)
- # clojure-austin (2)
- # clojure-brasil (18)
- # clojure-canada (1)
- # clojure-conj (5)
- # clojure-dev (11)
- # clojure-gamedev (30)
- # clojure-russia (380)
- # clojure-spec (50)
- # clojure-uk (35)
- # clojurescript (146)
- # clojutre (1)
- # component (1)
- # cursive (62)
- # datomic (27)
- # dirac (7)
- # editors (23)
- # emacs (7)
- # events (34)
- # funcool (22)
- # hoplon (134)
- # jobs (22)
- # jobs-rus (7)
- # juxt (1)
- # kekkonen (1)
- # lein-figwheel (54)
- # leiningen (7)
- # luminus (2)
- # off-topic (5)
- # om (4)
- # onyx (27)
- # proton (5)
- # protorepl (2)
- # re-frame (16)
- # reagent (29)
- # rethinkdb (2)
- # schema (1)
- # untangled (61)
- # yada (9)
@seancorfield another issue that come up with that change -- we were returning namespaced column names from sql that were being transformed back into namespaced keywords by the keyword
call in java.jdbc
. this doesn't work anymore because (name (keyword "foo/bar")) ;=> 'bar
while (namespace (keyword nil "foo/bar")) ;=> 'foo/bar
(example that was working before and is now failing: (let [{:keys [foo/bar]} (jdbc/query conn ["SELECT 1 AS \"foo/bar\""] {:result-set-fn first})] bar) ;=> nil ;; previously returned 1
I realize java.jdbc now has qualifier
but that doesn't do it for some of our queries where we return columns with the same name and different namespace from a query -- AFAIU we can't return :foo/bar
and :baz/bar
using qualifier
@bronsa Interesting… Could you add some notes about that to http://dev.clojure.org/jira/browse/JDBC-140 so I can be sure I have suitable test cases when I work on it? (won’t happen until after Labor Day since my wife & I are traveling quite a bit before then)
The change should not have broken anyone’s code — I only added :qualifier
because other ways of producing qualified keywords felt a bit hacky 😕
I think the fix should be simple enough, rather than (keyword qualifier (f x))
, something like (if qualifier (keyword qualifier (f x)) (keyword (f x)))
@seancorfield many thanks for the quick release!
I had a window while waiting for other stuff at work 🙂
I used your two examples as the basis of three new test cases. Hopefully that also solves your qualified key destructuring / select as foo/bar example since I didn’t verify that one specifically.