Class: ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueConstraintDefinition
- Inherits:
-
Struct
- Object
- Struct
- ActiveRecord::ConnectionAdapters::PostgreSQL::UniqueConstraintDefinition
- Defined in:
- 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
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
201 202 203 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 201 def column @column end |
#options ⇒ Object
Returns the value of attribute options
201 202 203 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 201 def end |
#table_name ⇒ Object
Returns the value of attribute table_name
201 202 203 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 201 def table_name @table_name end |
Instance Method Details
#deferrable ⇒ Object
206 207 208 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 206 def deferrable [:deferrable] end |
#defined_for?(name: nil, column: nil, **options) ⇒ Boolean
222 223 224 225 226 227 228 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 222 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
218 219 220 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 218 def export_name_on_schema_dump? !ActiveRecord::SchemaDumper.unique_ignore_pattern.match?(name) if name end |
#name ⇒ Object
202 203 204 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 202 def name [:name] end |
#nulls_not_distinct ⇒ Object
214 215 216 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 214 def nulls_not_distinct [:nulls_not_distinct] end |
#using_index ⇒ Object
210 211 212 |
# File 'lib/active_record/connection_adapters/postgresql/schema_definitions.rb', line 210 def using_index [:using_index] end |