translate_field_type(field_type)
private
Translate PostgreSQL-specific types into simplified SQL types. These are
special cases; standard types are handled by
ConnectionAdapters::Column#simplified_type.
Show source
def translate_field_type(field_type)
case field_type
when /\[\]$/i then 'string'
when /^timestamp/i then 'datetime'
when /^real|^money/i then 'float'
when /^interval/i then 'string'
when /^(?:point|lseg|box|"?path"?|polygon|circle)/i then 'string'
when /^bytea/i then 'binary'
else field_type
end
end