Added docs for #columns on some adapters

This commit is contained in:
Sebastian Martinez
2011-04-22 20:20:25 -03:00
parent 384dbfd140
commit 5d59cd8d6a
2 changed files with 2 additions and 0 deletions

View File

@@ -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 = []

View File

@@ -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"]