[svn-commits] r128 - drivers/ruby/main

grant at ingres.com grant at ingres.com
Tue Jul 1 08:45:29 PDT 2008


Author: grant
Date: 2008-07-01 08:45:29 -0700 (Tue, 01 Jul 2008)
New Revision: 128

Modified:
   drivers/ruby/main/CHANGELOG
   drivers/ruby/main/ingres_adapter.rb
Log:
Fix #196 - Data truncation occurs for the ActiveRecord text type

Modified: drivers/ruby/main/CHANGELOG
===================================================================
--- drivers/ruby/main/CHANGELOG	2008-06-30 16:18:19 UTC (rev 127)
+++ drivers/ruby/main/CHANGELOG	2008-07-01 15:45:29 UTC (rev 128)
@@ -1,4 +1,7 @@
-SVN
+ersion 1.3.0
+- Add quote_column_names() for quoting of table and column names. Required
+  for the ActiveRecord base unit tests
+- Fix data truncation for the ActiveRecord :text type
 - Add support for Ingres datatypes float4, float8, money, decimal, bigint,
   and ANSI date/time/timestamp.
 - Add support in ingres_adapter.rb for Rails migrations

Modified: drivers/ruby/main/ingres_adapter.rb
===================================================================
--- drivers/ruby/main/ingres_adapter.rb	2008-06-30 16:18:19 UTC (rev 127)
+++ drivers/ruby/main/ingres_adapter.rb	2008-07-01 15:45:29 UTC (rev 128)
@@ -34,6 +34,11 @@
 #           Add mapping for Ingres ANSI date/time formats and change
 #           INGRESDATE (=DATE in pre-ANSI Ingres) mapping from :date to
 #           :datetime.
+#       07/02/08 (grant.croker at ingres.com)
+#           Add quote_column_names() for quoting of table and column names. 
+#           Required for the ActiveRecord base unit tests
+#       07/02/08 (grant.croker at ingres.com)
+#           Fix data truncation for the ActiveRecord :text type
 #++
 
 
@@ -227,10 +232,9 @@
          def native_database_types
             complete_trace(" in native_database_type ")
             {
-               #:primary_key => "TABLE_KEY NOT NULL with system_maintained",
                :primary_key => "integer NOT NULL PRIMARY KEY",
-               :string      => { :name => "varchar(255)"},
-               :text        => { :name => "text" },
+               :string      => { :name => "varchar", :limit => 255 },
+               :text        => { :name => "varchar", :limit => 32000 },
                :integer     => { :name => "integer" },
                :float       => { :name => "float" },
                :datetime    => { :name => "ingresdate" },
@@ -376,6 +380,10 @@
             return column_name
          end
 
+         # Quotes column names for use in SQL queries.
+         def quote_column_name(name) #:nodoc:
+            %("#{name}")
+         end
 
          # DATABASE STATEMENTS ======================================
 




More information about the svn-commits mailing list