diff options
author | Marcel Molina <marcel@vernix.org> | 2006-01-04 04:17:23 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2006-01-04 04:17:23 +0000 |
commit | a5708b4c1f137baba8510ca1e1985bd1f878604b (patch) | |
tree | 70fd229bb416a4c57878216cd71e5f388e29b03d /activerecord/lib/active_record/vendor/db2.rb | |
parent | bbec3ae512290eaee7942d3c073285f69c7ecf0a (diff) | |
download | rails-a5708b4c1f137baba8510ca1e1985bd1f878604b.tar.gz rails-a5708b4c1f137baba8510ca1e1985bd1f878604b.tar.bz2 rails-a5708b4c1f137baba8510ca1e1985bd1f878604b.zip |
Multiple enhancements and adjustments to DB2 adaptor. Closes #3377.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3380 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/vendor/db2.rb')
-rw-r--r-- | activerecord/lib/active_record/vendor/db2.rb | 11 |
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 |