Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle Java::JavaSql::Date type in the JDBC adapter

  • Loading branch information...
commit 6ad427c9a714a3a91cd168eedaf9ac199f77a9b0 1 parent ef3f56e
@jeremyevans authored
Showing with 4 additions and 2 deletions.
  1. +2 −0  CHANGELOG
  2. +2 −2 lib/sequel_core/adapters/jdbc.rb
View
2  CHANGELOG
@@ -1,5 +1,7 @@
=== HEAD
+* Handle Java::JavaSql::Date type in the JDBC adapter (jeremyevans)
+
* Add support for read-only slave/writable master databases and database sharding (jeremyevans)
* Remove InvalidExpression, InvalidFilter, InvalidJoinType, and WorkerStop exceptions (jeremyevans)
View
4 lib/sequel_core/adapters/jdbc.rb
@@ -256,7 +256,7 @@ def set_ps_arg(cps, arg, i)
cps.setInt(i, arg)
when String
cps.setString(i, arg)
- when Date
+ when Date, Java::JavaSql::Date
cps.setDate(i, arg)
when Time, DateTime, Java::JavaSql::Timestamp
cps.setTimestamp(i, arg)
@@ -339,7 +339,7 @@ def literal(v)
case v
when Time
literal(v.iso8601)
- when Date, DateTime, Java::JavaSql::Timestamp
+ when Date, DateTime, Java::JavaSql::Timestamp, Java::JavaSql::Date
literal(v.to_s)
else
super
Please sign in to comment.
Something went wrong with that request. Please try again.