Fork me on GitHub

question, why are these 2 different:

(set/union (vals {:e #{:m :f}, :c #{:f}, :b #{:c :f}, :d #{:m :f}, :a #{:c :f}}) )
;;=> (#{:m :f} #{:f} #{:c :f} #{:m :f} #{:c :f})
(apply set/union (vals {:e #{:m :f}, :c #{:f}, :b #{:c :f}, :d #{:m :f}, :a #{:c :f}}) )
;;=> #{:m :c :f}




What is the correct way to read a clob data type using clojure/java.jdbc (version 0.6.1 onwards)? An example on the internet ( uses the functions with-connection and with-query-results, but these functions are no longer found in version 0.6.1.


Hey Guys! I would love to get some feedback on my solution for one of the problems on 4clojure: My solution: Can my solution be considered OK, or are there any better (simpler, more logical, best-practice) approaches to this problem?


@peter.d: Style nitpick, in clojure things are named with kebab-case and not camelCase. So flattenImplementation -> flatten-implementation, finalList -> final-list, etc. Otherwise I'd consider your solution ok, but you should follow some users on the site to see their solutions after you've solved a problem, it's incredibly informative.


TIL kebab-case 💯


@peter.d thanks for the link to, it is pretty awesome


@saicheong: The definitive java.jdbc is — which links to the community-managed docs (but those sometimes lag behind since that web site is not auto-published when updates are pushed to the repo).


That example code you found hasn’t worked for years — those functions disappeared from the API many versions back.


I’ve added a complete example of how to do it with the modern java.jdbc API.


@madstap: Thanks for the info about the naming convention! And good idea regarding following people on 4clojure - I started following some of the top users. Thanks 🙂 @keith.moore: np, here's another link with lots of good info for beginners;