Fix potential reflection warnings from use of next.jdbc.prepare/statement

This commit is contained in:
Sean Corfield 2020-06-07 10:02:20 -07:00
parent 509e065fbf
commit 4045e18f3e
2 changed files with 8 additions and 6 deletions

View file

@ -5,6 +5,7 @@ Only accretive/fixative changes will be made from now on.
Changes made on master since 1.0.462:
* Add tests for `"jtds"` database driver (against MS SQL Server), making it officially supported.
* Switch from OpenTable Embedded PostgreSQL to Zonky's version, so that testing can move forward from PostgreSQL 10.11 to 12.2.0.
* Fix potential reflection warnings caused by `next.jdbc.prepare/statement` being incorrectly type-hinted.
* Address #119 by clarifying realization actions in the docstrings for `row-number`, `column-names`, and `metadata`.
* Address #115 by adding equivalent of `db-do-commands` in the `clojure.java.jdbc` migration guide.
* Add log4j2 as a test dependency so that I have better control over logging (which makes debugging easier!).

View file

@ -149,12 +149,13 @@
(defn statement
"Given a `Connection` and some options, return a `Statement`."
^java.sql.Statement
([con] (statement con {}))
([^Connection con
{:keys [result-type concurrency cursors
fetch-size max-rows timeout]
:as opts}]
(^java.sql.Statement
[con] (statement con {}))
(^java.sql.Statement
[^Connection con
{:keys [result-type concurrency cursors
fetch-size max-rows timeout]
:as opts}]
(let [^Statement stmt
(cond
(and result-type concurrency)