Commit graph

3 commits

Author SHA1 Message Date
Jakub Holy
484ed90b7c
Fix next.jdbc.date-time for java.sql.Date
An insert fails with
> UnsupportedOperationException: null at java.sql/java.sql.Date.toInstant(Date.java:316)

if you required `next.jdbc.date-time` and the value you are inserting is `java.sql.Date` because it is a subclass of `java.util.Date` and thus gets handled by https://github.com/seancorfield/next-jdbc/blob/master/src/next/jdbc/date_time.clj#L45 - but it doesn't support `toInstant` contrary to its superclass.

The solution is to use `.setDate` with the value as-is instead of `.setTimestamp`.
2019-11-18 15:27:11 +01:00
Sean Corfield
7ad1b720e9 Fix typo in docstring
Thanks to @holyjak for spotting this!
2019-11-15 10:54:04 -08:00
Sean Corfield
7b6aa69e31 Fixes #73 by adding optional namespace to extend SettableParameter 2019-11-14 17:10:49 -08:00