Title: [634] trunk/activerecord-jdbc/src/java/JdbcAdapterInternalService.java: Handle types more flexibly
- Revision
- 634
- Author
- olabini
- Date
- 2007-06-18 06:57:58 -0400 (Mon, 18 Jun 2007)
Log Message
Handle types more flexibly
Modified Paths
Diff
Modified: trunk/activerecord-jdbc/src/java/JdbcAdapterInternalService.java (633 => 634)
--- trunk/activerecord-jdbc/src/java/JdbcAdapterInternalService.java 2007-06-18 10:43:08 UTC (rev 633)
+++ trunk/activerecord-jdbc/src/java/JdbcAdapterInternalService.java 2007-06-18 10:57:58 UTC (rev 634)
@@ -59,6 +59,7 @@
import org.jruby.RubyNumeric;
import org.jruby.RubyObject;
import org.jruby.RubyString;
+import org.jruby.RubySymbol;
import org.jruby.RubyTime;
import org.jruby.javasupport.JavaObject;
import org.jruby.runtime.Arity;
@@ -622,6 +623,9 @@
}
private static int getTypeValueFor(Ruby runtime, IRubyObject type) throws SQLException {
+ if(!(type instanceof RubySymbol)) {
+ type = type.callMethod(runtime.getCurrentContext(),"type");
+ }
if(type == runtime.newSymbol("string")) {
return Types.VARCHAR;
} else if(type == runtime.newSymbol("text")) {
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel