From beff664f2a036c91e266e2ad867f3d1ed8d716c8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 27 Oct 2005 08:18:41 +0000 Subject: Refactor DB exceptions and deal more with DB2 (closes #2624) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/active_record/connection_adapters/db2_adapter.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'activerecord/lib/active_record/connection_adapters/db2_adapter.rb') diff --git a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb index cc0e535123..232971e4ec 100644 --- a/activerecord/lib/active_record/connection_adapters/db2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/db2_adapter.rb @@ -1,4 +1,4 @@ -# Author: Maik Schmidt +# Author/Maintainer: Maik Schmidt require 'active_record/connection_adapters/abstract_adapter' @@ -113,6 +113,14 @@ begin end end + def tables(name = nil) + stmt = DB2::Statement.new(@connection) + result = [] + stmt.tables.each { |t| result << t[2].downcase } + stmt.free + result + end + def columns(table_name, name = nil) stmt = DB2::Statement.new(@connection) result = [] -- cgit v1.2.3