You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the following code, both ISO-date-format and java->joda-local-date are flagged as being unused.
(defISO-date-format
(tf/formatter"yyyy-MM-dd"))
(defnjava->joda-local-date [java-local-date]
(tf/parse-local-date ISO-date-format (.toString java-local-date)))
;; Prevent default behaviour of coercing sql-dates into clojure instants. A date in our database refers to a calendar day, not a moment in time, and coercing to an instant in time brings all manner of silly painful bugs.;; https://dev.clojure.org/jira/browse/JDBC-35 for more details
(extend-protocol jdbc/IResultSetReadColumn
java.sql.Date
(result-set-read-column [val _ _]
(java->joda-local-date (.toLocalDate val)))
java.sql.Timestamp
(result-set-read-column [val _ _]
(.toInstant val))
org.postgresql.jdbc4.Jdbc4Array
(result-set-read-column [pgobj _ _]
(vec (.getArray pgobj)))
org.postgresql.util.PGobject
(result-set-read-column [pgobj _ _]
(if (= (.getType pgobj) "json")
(json/read-str (.toString pgobj)
:key-fn (comp keyword name dbh/snake-case->kebab-case))
pgobj)))
The text was updated successfully, but these errors were encountered:
thisdotrob
changed the title
Ignores functions used inside extend-protocol
Ignores functions used inside 'extend-protocol'
Jun 19, 2018
For the following code, both
ISO-date-format
andjava->joda-local-date
are flagged as being unused.The text was updated successfully, but these errors were encountered: