Title: [608] trunk/activerecord-jdbc: HSQLDB fixes, thanks to Matthew Williams
Revision
608
Author
nicksieger
Date
2007-06-01 10:09:00 -0400 (Fri, 01 Jun 2007)

Log Message

HSQLDB fixes, thanks to Matthew Williams

Modified Paths


Diff

Modified: trunk/activerecord-jdbc/Rakefile (607 => 608)


--- trunk/activerecord-jdbc/Rakefile	2007-05-31 14:42:49 UTC (rev 607)
+++ trunk/activerecord-jdbc/Rakefile	2007-06-01 14:09:00 UTC (rev 608)
@@ -40,7 +40,7 @@
 desc "Run AR-JDBC tests"
 if RUBY_PLATFORM =~ /java/
   # TODO: add more databases into the standard tests here.
-  task :test => [:java_compile, :test_mysql, :test_derby]
+  task :test => [:java_compile, :test_mysql, :test_derby, :test_hsqldb]
 else
   task :test => [:test_mysql]
 end

Modified: trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_hsqldb.rb (607 => 608)


--- trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_hsqldb.rb	2007-05-31 14:42:49 UTC (rev 607)
+++ trunk/activerecord-jdbc/lib/jdbc_adapter/jdbc_hsqldb.rb	2007-06-01 14:09:00 UTC (rev 608)
@@ -110,7 +110,9 @@
     end
 
     def insert(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil) #:nodoc:
-      execute(sql, name)
+      log_no_bench(sql,name) do
+        @connection.execute_update(sql)
+      end
       table = sql.split(" ", 4)[2]
       id_value || last_insert_id(table, nil)
     end
@@ -136,9 +138,11 @@
     # system tables SYSTEM.*, but H2 seems to name them without
     # any kind of convention
     def tables
-      @connection.tables do |result_row|
-        result_row.get_string(ActiveRecord::ConnectionAdapters::Jdbc::TableMetaData::TABLE_TYPE) !~ /^SYSTEM TABLE$/i
+      _results = []
+      @connection.tables.each do |result_row|
+        _results << result_row.to_s if result_row.to_s !~ /^system_/i
       end
+      _results
     end
 
     # For migrations, exclude the primary key index as recommended
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to