Class: ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueConstraintDefinition
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Struct
|
|
Instance Chain:
self,
::Struct
|
|
Inherits: | Struct |
Defined in: | activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb |
Instance Attribute Summary
- #column rw
- #export_name_on_schema_dump? ⇒ Boolean readonly
- #options rw
- #table_name rw
Instance Method Summary
- #deferrable
- #defined_for?(name: nil, column: nil, **options) ⇒ Boolean
- #name
- #nulls_not_distinct
- #using_index
::Struct
- Inherited
Instance Attribute Details
#column (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214
UniqueConstraintDefinition = Struct.new(:table_name, :column, : )
#export_name_on_schema_dump? ⇒ Boolean
(readonly)
[ GitHub ]
# 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
#options (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214
UniqueConstraintDefinition = Struct.new(:table_name, :column, : )
#table_name (rw)
[ GitHub ]Instance Method Details
#deferrable
[ GitHub ]# 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
# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 235
def defined_for?(name: nil, column: nil, ** ) (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
#name
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 215
def name [:name] end
#nulls_not_distinct
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 227
def nulls_not_distinct [:nulls_not_distinct] end
#using_index
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 223
def using_index [:using_index] end