mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Added docs for #columns on some adapters
This commit is contained in:
@@ -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 = []
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user