Class: ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueKeyDefinition

Inherits:
Struct
  • Object
show all
Defined in:
activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Struct

#as_json

Instance Attribute Details

#columnsObject

Returns the value of attribute columns

Returns:

  • (Object)

    the current value of columns



214
215
216
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214

def columns
  @columns
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



214
215
216
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214

def options
  @options
end

#table_nameObject

Returns the value of attribute table_name

Returns:

  • (Object)

    the current value of 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

#deferrableObject



219
220
221
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 219

def deferrable
  options[:deferrable]
end

#export_name_on_schema_dump?Boolean

Returns:

  • (Boolean)


223
224
225
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 223

def export_name_on_schema_dump?
  !ActiveRecord::SchemaDumper.unique_ignore_pattern.match?(name) if name
end

#nameObject



215
216
217
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 215

def name
  options[:name]
end