Class: ActiveRecord::ConnectionAdapters::ColumnDefinition
- Defined in:
 - activerecord/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.
Instance Attribute Summary collapse
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute options.
 - 
  
    
      #sql_type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute sql_type.
 - 
  
    
      #type  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute type.
 
Instance Method Summary collapse
Methods inherited from Struct
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
      78 79 80  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 78 def name @name end  | 
  
#options ⇒ Object
Returns the value of attribute options
      78 79 80  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 78 def end  | 
  
#sql_type ⇒ Object
Returns the value of attribute sql_type
      78 79 80  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 78 def sql_type @sql_type end  | 
  
#type ⇒ Object
Returns the value of attribute type
      78 79 80  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 78 def type @type end  | 
  
Instance Method Details
#aliased_types(name, fallback) ⇒ Object
      108 109 110  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 108 def aliased_types(name, fallback) "timestamp" == name ? :datetime : fallback end  | 
  
#primary_key? ⇒ Boolean
      92 93 94  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 92 def primary_key? [:primary_key] end  |