diff options
author | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-22 20:20:25 -0300 |
---|---|---|
committer | Sebastian Martinez <sebastian@wyeworks.com> | 2011-04-22 20:20:25 -0300 |
commit | 5d59cd8d6a8181cafa55af6189e0984b618e19be (patch) | |
tree | 5a5ab76bc5ec2ca5596cdba274d6666156e1fded /activerecord/lib/active_record/connection_adapters | |
parent | 384dbfd1408721ded071a587b0dc9ee40203607e (diff) | |
download | rails-5d59cd8d6a8181cafa55af6189e0984b618e19be.tar.gz rails-5d59cd8d6a8181cafa55af6189e0984b618e19be.tar.bz2 rails-5d59cd8d6a8181cafa55af6189e0984b618e19be.zip |
Added docs for #columns on some adapters
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 1 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index c5a9ac683c..381995b1b6 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -626,6 +626,7 @@ module ActiveRecord indexes end + # Returns an array of +MysqlColumn+ objects for the table specified by +table_name+. def columns(table_name, name = nil)#:nodoc: sql = "SHOW FIELDS FROM #{quote_table_name(table_name)}" columns = [] diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index 24d1bed165..90f20c15b5 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -244,6 +244,7 @@ module ActiveRecord end end + # Returns an array of +SQLiteColumn+ objects for the table specified by +table_name+. def columns(table_name, name = nil) #:nodoc: table_structure(table_name).map do |field| case field["dflt_value"] |