aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/db2_adapter.rb
diff options
context:
space:
mode:
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 = []