The various JDBC classes have a number of setters that can be invoked directly via interop after next.jdbc has created them. However, this makes for somewhat ugly code since you need to explicitly create and use each object so that you can invoke setters on it:
(with-open [con (jdbc/get-connection ,,,)]
(.setSomething con ,,,)
(with-open [ps (jdbc/prepare con ,,,)]
(.setThing ps ,,,)
(jdbc/execute! ps)))
Given the new set-properties in org.clojure/java.data 0.1.5, it would be possible to pass connection and statement setter options via the top-level options map and have those applied automatically inside next.jdbc methods:
The various JDBC classes have a number of setters that can be invoked directly via interop after
next.jdbc
has created them. However, this makes for somewhat ugly code since you need to explicitly create and use each object so that you can invoke setters on it:Given the new
set-properties
inorg.clojure/java.data
0.1.5, it would be possible to pass connection and statement setter options via the top-level options map and have those applied automatically insidenext.jdbc
methods:(actual names TBD)