Class: Arc::DataStores::ObjectDefinitions::MysqlColumn

Inherits:
Column
  • Object
show all
Defined in:
lib/arc/data_stores/mysql/object_definitions.rb

Constant Summary collapse

TYPES =
{
  :int => :integer,
}

Instance Attribute Summary

Attributes inherited from Column

#default, #name

Instance Method Summary collapse

Methods inherited from Column

#allows_null?, #initialize, #pk?

Constructor Details

This class inherits a constructor from Arc::DataStores::ObjectDefinitions::Column

Instance Method Details

#typeObject



57
58
59
60
61
62
63
# File 'lib/arc/data_stores/mysql/object_definitions.rb', line 57

def type
  @stype ||= ''
  @type ||= begin
    type_key = @stype.downcase.gsub(/\([\d,]*\)/, '').to_sym
    TYPES[type_key] || type_key
  end
end