activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
# Returns an array of +Column+ objects for the table specified by +table_name+.
Returns an array of +Column+ objects for the table specified by +table_name+.
Returns an array of + Column + objects for the table specified by + table_name + .
def columns(table_name) 
        table_structure(table_name).map do |field|
          case field["dflt_value"]
          when /^null$/i
            field["dflt_value"] = nil
          when /^'(.*)'$/m
            field["dflt_value"] = $1.gsub("''", "'")
          when /^"(.*)"$/m
            field["dflt_value"] = $1.gsub('""', '"')
          end
          sql_type = field['type']
          type_metadata = fetch_type_metadata(sql_type)
          new_column(field['name'], field['dflt_value'], type_metadata, field['notnull'].to_i == 0)
        end
      end
def columns ( table_name ) table_structure ( table_name ) . map do | field | case field [ "dflt_value" ] when / ^null$ /i field [ "dflt_value" ] = nil when / ^'(.*)'$ /m field [ "dflt_value" ] = $1 . gsub ( "''" , "'" ) when / ^"(.*)"$ /m field [ "dflt_value" ] = $1 . gsub ( '""' , '"' ) end sql_type = field [ 'type' ] type_metadata = fetch_type_metadata ( sql_type ) new_column ( field [ 'name' ] , field [ 'dflt_value' ] , type_metadata , field [ 'notnull' ] . to_i == 0 ) end end
Returns an array of +Column+ objects for the table specified by +table_name+.
Returns an array of + Column + objects for the table specified by + table_name + .
#:nodoc:
table_name
<not_specific>