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
- #auto_increment? ⇒ Boolean (also: #auto_incremented_by_db?) readonly
-
#auto_incremented_by_db?
readonly
Alias for #auto_increment?.
- #case_sensitive? ⇒ Boolean readonly
- #extra readonly
- #unsigned? ⇒ Boolean readonly
- #virtual? ⇒ Boolean readonly
::ActiveRecord::ConnectionAdapters::Column
- Inherited
#limit, #precision, #scale, #sql_type, #type, | |
#auto_incremented_by_db? | whether the column is auto-populated by the database using a sequence. |
#auto_populated?, #bigint?, #collation, #comment, #default, #default_function, #has_default?, #name, #null, #sql_type_metadata, #virtual? |
Instance Method Summary
::ActiveRecord::ConnectionAdapters::Column
- Inherited
#==, #encode_with, | |
#eql? | Alias for Column#==. |
#hash, | |
#human_name | Returns the human name of the column name. |
#init_with, #deduplicated |
::ActiveRecord::ConnectionAdapters::Deduplicable
- Included
#-@ | Alias for Deduplicable#deduplicate. |
#deduplicate, #deduplicated |
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?.
# 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