Class: ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueConstraintDefinition
- Defined in:
 - activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
 
Instance Attribute Summary collapse
- 
  
    
      #column  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute column.
 - 
  
    
      #options  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute options.
 - 
  
    
      #table_name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute table_name.
 
Instance Method Summary collapse
- #deferrable ⇒ Object
 - #defined_for?(name: nil, column: nil, **options) ⇒ Boolean
 - #export_name_on_schema_dump? ⇒ Boolean
 - #name ⇒ Object
 - #nulls_not_distinct ⇒ Object
 - #using_index ⇒ Object
 
Methods inherited from Struct
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
      214 215 216  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214 def column @column end  | 
  
#options ⇒ Object
Returns the value of attribute options
      214 215 216  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214 def @options end  | 
  
#table_name ⇒ Object
Returns the value of attribute table_name
      214 215 216  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214 def table_name @table_name end  | 
  
Instance Method Details
#deferrable ⇒ Object
      219 220 221  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 219 def deferrable [:deferrable] end  | 
  
#defined_for?(name: nil, column: nil, **options) ⇒ Boolean
      235 236 237 238 239 240 241  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 235 def defined_for?(name: nil, column: nil, **) = .slice(*self..keys) (name.nil? || self.name == name.to_s) && (column.nil? || Array(self.column) == Array(column).map(&:to_s)) && .all? { |k, v| self.[k].to_s == v.to_s } end  | 
  
#export_name_on_schema_dump? ⇒ Boolean
      231 232 233  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 231 def export_name_on_schema_dump? !ActiveRecord::SchemaDumper.unique_ignore_pattern.match?(name) if name end  | 
  
#name ⇒ Object
      215 216 217  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 215 def name [:name] end  | 
  
#nulls_not_distinct ⇒ Object
      227 228 229  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 227 def nulls_not_distinct [:nulls_not_distinct] end  | 
  
#using_index ⇒ Object
      223 224 225  | 
    
      # File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 223 def using_index [:using_index] end  |