Class: ActiveRecord::ConnectionAdapters::CheckConstraintDefinition
Relationships & Source Files | |
Inherits: |
Struct
|
Defined in: | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb |
Instance Attribute Summary
- #export_name_on_schema_dump? ⇒ Boolean readonly
- #expression rw
- #options rw
- #table_name rw
- #validate? ⇒ Boolean (also: #validated?) readonly
-
#validated?
readonly
Alias for #validate?.
Instance Method Summary
Instance Attribute Details
#export_name_on_schema_dump? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 184
def export_name_on_schema_dump? !ActiveRecord::SchemaDumper.chk_ignore_pattern.match?(name) if name end
#expression (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 174
CheckConstraintDefinition = Struct.new(:table_name, :expression, : )
#options (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 174
CheckConstraintDefinition = Struct.new(:table_name, :expression, : )
#table_name (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 174
CheckConstraintDefinition = Struct.new(:table_name, :expression, : )
#validate? ⇒ Boolean
(readonly)
Also known as: #validated?
[ GitHub ]
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 179
def validate? .fetch(:validate, true) end
#validated? (readonly)
Alias for #validate?.
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 182
alias validated? validate?
Instance Method Details
#defined_for?(name:, expression: nil, validate: nil, **options) ⇒ Boolean
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 188
def defined_for?(name:, expression: nil, validate: nil, ** ) self.name == name.to_s && (validate.nil? || validate == self. .fetch(:validate, validate)) && .all? { |k, v| self. [k].to_s == v.to_s } end
#name
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 175
def name [:name] end