Class: ActiveRecord::ConnectionAdapters::ColumnDefinition
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecord::ConnectionAdapters::ColumnDefinition
- Defined in:
- lib/active_record/connection_adapters/abstract/schema_definitions.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
-
#default ⇒ Object
Returns the value of attribute default.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#name ⇒ Object
Returns the value of attribute name.
-
#null ⇒ Object
Returns the value of attribute null.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #to_sql ⇒ Object (also: #to_s)
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def base @base end |
#default ⇒ Object
Returns the value of attribute default
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def default @default end |
#limit ⇒ Object
Returns the value of attribute limit
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def limit @limit end |
#name ⇒ Object
Returns the value of attribute name
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def name @name end |
#null ⇒ Object
Returns the value of attribute null
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def null @null end |
#type ⇒ Object
Returns the value of attribute type
167 168 169 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 167 def type @type end |
Instance Method Details
#to_sql ⇒ Object Also known as: to_s
168 169 170 171 172 |
# File 'lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 168 def to_sql column_sql = "#{base.quote_column_name(name)} #{type_to_sql(type.to_sym, limit)}" (column_sql, :null => null, :default => default) column_sql end |