Fork me on GitHub

@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 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)


yeah sure, no worries :)


"you're not supposed to do that" is an acceptable answer btw


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.