aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/vendor/db2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/vendor/db2.rb')
-rw-r--r--activerecord/lib/active_record/vendor/db2.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/vendor/db2.rb b/activerecord/lib/active_record/vendor/db2.rb
index 42171beda8..5ebd348a0a 100644
--- a/activerecord/lib/active_record/vendor/db2.rb
+++ b/activerecord/lib/active_record/vendor/db2.rb
@@ -110,13 +110,18 @@ module DB2
check_rc(rc)
end
- def columns(table_name)
- check_rc(SQLColumns(@handle, "", "%", table_name, "%"))
+ def columns(table_name, schema_name = '%')
+ check_rc(SQLColumns(@handle, '', schema_name, table_name, '%'))
fetch_all
end
def tables
- check_rc(SQLTables(@handle, "", "%", "%", "TABLE"))
+ check_rc(SQLTables(@handle, '', '%', '%', 'TABLE'))
+ fetch_all
+ end
+
+ def indexes(table_name)
+ check_rc(SQLStatistics(@handle, '', '', table_name, SQL_INDEX_ALL, SQL_ENSURE))
fetch_all
end