lib/active_record/connection_adapters/fdbsql/schema_statements.rb
# Returns an array of Column objects for the table specified by +table_name+.
# See the concrete implementation for details on the expected parameter values.
Returns an array of Column objects for the table specified by +table_name+.
See the concrete implementation for details on the expected parameter values.
Returns an array of Column objects for the table specified by + table_name + . See the concrete implementation for details on the expected parameter values .
def columns(table_name, name = nil)
          type_part = @sql_layer_version >= 10903 ?
            " COLUMN_TYPE_STRING(table_schema, table_name, column_name), " :
            " data_type||COALESCE('('||character_maximum_length||')', '('||numeric_precision||','||numeric_scale||')', ''), "
          select_rows(
            "SELECT column_name, "+
            "       column_default, "+
                    type_part +
            "       is_nullable "+
            "FROM information_schema.columns "+
            "WHERE table_schema = CURRENT_SCHEMA "+
            "  AND table_name = '#{quote_string(table_name.to_s)}' "+
            "ORDER BY ordinal_position",
            name || SCHEMA_LOG_NAME
          ).map { |row|
            type_str = row[2].gsub(' ', '').downcase
            FdbSqlColumn.new(row[0], row[1], type_str, row[3] == 'YES')
          }
        end
def columns ( table_name , name = nil ) type_part = @sql_layer_version >= 10903 ? " COLUMN_TYPE_STRING(table_schema, table_name, column_name), " : " data_type||COALESCE('('||character_maximum_length||')', '('||numeric_precision||','||numeric_scale||')', ''), " select_rows ( "SELECT column_name, " + "       column_default, " + type_part + "       is_nullable " + "FROM information_schema.columns " + "WHERE table_schema = CURRENT_SCHEMA " + "  AND table_name = '#{quote_string(table_name.to_s)}' " + "ORDER BY ordinal_position" , name || SCHEMA_LOG_NAME ) . map { | row | type_str = row [ 2 ] . gsub ( ' ' , '' ) . downcase FdbSqlColumn . new ( row [ 0 ] , row [ 1 ] , type_str , row [ 3 ] == 'YES' ) } 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 + .
# Base Column depends on lower and no space (e.g. DECIMAL(10, 0) => decimal(10,0))
table_name
name