Class: ActiveRecord::ConnectionAdapters::ColumnDefinition
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecord::ConnectionAdapters::ColumnDefinition
- Defined in:
- lib/active_record/connection_adapters/abstract/schema_definitions.rb
Overview
Abstract representation of a column definition. Instances of this type are typically created by methods in TableDefinition, and added to the columns
attribute of said TableDefinition object, in order to be used for generating a number of table creation or table changing SQL statements.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#after ⇒ Object
Returns the value of attribute after.
-
#auto_increment ⇒ Object
Returns the value of attribute auto_increment.
-
#collation ⇒ Object
Returns the value of attribute collation.
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#default ⇒ Object
Returns the value of attribute default.
-
#first ⇒ Object
Returns the value of attribute first.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#name ⇒ Object
Returns the value of attribute name.
-
#null ⇒ Object
Returns the value of attribute null.
-
#precision ⇒ Object
Returns the value of attribute precision.
-
#primary_key ⇒ Object
Returns the value of attribute primary_key.
-
#scale ⇒ Object
Returns the value of attribute scale.
-
#sql_type ⇒ Object
Returns the value of attribute sql_type.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#after ⇒ Object
Returns the value of attribute after
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def after @after end |
#auto_increment ⇒ Object
Returns the value of attribute auto_increment
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def auto_increment @auto_increment end |
#collation ⇒ Object
Returns the value of attribute collation
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def collation @collation end |
#comment ⇒ Object
Returns the value of attribute comment
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def comment @comment end |
#default ⇒ Object
Returns the value of attribute default
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def default @default end |
#first ⇒ Object
Returns the value of attribute first
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def first @first end |
#limit ⇒ Object
Returns the value of attribute limit
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def limit @limit end |
#name ⇒ Object
Returns the value of attribute name
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def name @name end |
#null ⇒ Object
Returns the value of attribute null
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def null @null end |
#precision ⇒ Object
Returns the value of attribute precision
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def precision @precision end |
#primary_key ⇒ Object
Returns the value of attribute primary_key
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def primary_key @primary_key end |
#scale ⇒ Object
Returns the value of attribute scale
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def scale @scale end |
#sql_type ⇒ Object
Returns the value of attribute sql_type
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def sql_type @sql_type end |
#type ⇒ Object
Returns the value of attribute type
13 14 15 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 13 def type @type end |
Instance Method Details
#primary_key? ⇒ Boolean
15 16 17 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 15 def primary_key? primary_key || type.to_sym == :primary_key end |