Title: [575] trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_derby.rb: Handling quoting more correctly in Derby
- Revision
- 575
- Author
- olabini
- Date
- 2007-05-11 15:05:30 -0400 (Fri, 11 May 2007)
Log Message
Handling quoting more correctly in Derby
Modified Paths
Diff
Modified: trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_derby.rb (574 => 575)
--- trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_derby.rb 2007-05-11 16:03:15 UTC (rev 574)
+++ trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_derby.rb 2007-05-11 19:05:30 UTC (rev 575)
@@ -333,11 +333,27 @@
when :string
"'#{quote_string(value)}'"
else
- super
+ vi = value.to_i
+ if vi.to_s == value
+ value
+ else
+ super
+ end
end
else
super
end
+ when Float, Fixnum, Bignum:
+ if column
+ case column.type
+ when :string
+ "'#{quote_string(value.to_s)}'"
+ else
+ super
+ end
+ else
+ super
+ end
else super
end
end
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel