Title: [749] trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb: Some small fixes for Oracle with regard to binary types
Revision
749
Author
olabini
Date
2007-09-26 11:39:33 -0400 (Wed, 26 Sep 2007)

Log Message

Some small fixes for Oracle with regard to binary types

Modified Paths


Diff

Modified: trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb (748 => 749)


--- trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb	2007-09-26 14:51:32 UTC (rev 748)
+++ trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_oracle.rb	2007-09-26 15:39:33 UTC (rev 749)
@@ -13,7 +13,6 @@
         }
       end
     end
-
     private :write_lobs
   end
 end
@@ -70,7 +69,7 @@
       end
       
       private
-      def simplified_type(field_type)      
+      def simplified_type(field_type)
         case field_type
         when /^number\(1\)$/i                  : :boolean
         when /char/i                           : :string
@@ -302,11 +301,11 @@
     end
     
     def quote(value, column = nil) #:nodoc:
-      if column && column.type == :binary
+      if column && [:text, :binary].include?(column.type)
         if /(.*?)\([0-9]+\)/ =~ column.sql_type
-          %Q{empty_#{ $1 }()}
+          %Q{empty_#{ $1.downcase }()}
         else
-          %Q{empty_#{ column.sql_type rescue 'blob' }()}
+          %Q{empty_#{ column.sql_type.downcase rescue 'blob' }()}
         end
       else
         if column && column.type == :primary_key
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to