aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-27 08:18:41 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-27 08:18:41 +0000
commitbeff664f2a036c91e266e2ad867f3d1ed8d716c8 (patch)
treea175c7bc0ed6affea55d1595577a2c37e38c74e0 /activerecord/lib/active_record/connection_adapters/db2_adapter.rb
parentf15819e8f0cece48ccd5117a37cf6d37374d1bb1 (diff)
downloadrails-beff664f2a036c91e266e2ad867f3d1ed8d716c8.tar.gz
rails-beff664f2a036c91e266e2ad867f3d1ed8d716c8.tar.bz2
rails-beff664f2a036c91e266e2ad867f3d1ed8d716c8.zip
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
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/db2_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/db2_adapter.rb10
1 files changed, 9 insertions, 1 deletions
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 <contact@maik-schmidt.de>
+# Author/Maintainer: Maik Schmidt <contact@maik-schmidt.de>
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 = []