123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::MySQL::Column

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::ConnectionAdapters::Column
Defined in: activerecord/lib/active_record/connection_adapters/mysql/column.rb

Class Method Summary

::ActiveRecord::ConnectionAdapters::Column - Inherited

.new

Instantiates a new column in the table.

Instance Attribute Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from ActiveRecord::ConnectionAdapters::Column

Instance Attribute Details

#auto_increment?Boolean (readonly) Also known as: #auto_incremented_by_db?

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 17

def auto_increment?
  extra == "auto_increment"
end

#auto_incremented_by_db? (readonly)

Alias for #auto_increment?.

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 20

alias_method :auto_incremented_by_db?, :auto_increment?

#case_sensitive?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 13

def case_sensitive?
  collation && !collation.end_with?("_ci")
end

#extra (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 7

delegate :extra, to: :, allow_nil: true

#unsigned?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 9

def unsigned?
  /\bunsigned(?: zerofill)?\z/.match?(sql_type)
end

#virtual?Boolean (readonly)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/mysql/column.rb', line 22

def virtual?
  /\b(?:VIRTUAL|STORED|PERSISTENT)\b/.match?(extra)
end