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 183
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 173
CheckConstraintDefinition = Struct.new(:table_name, :expression, : )
#options (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 173
CheckConstraintDefinition = Struct.new(:table_name, :expression, : )
#table_name (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 173
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 178
def validate? .fetch(:validate, true) end
#validated? (readonly)
Alias for #validate?.
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 181
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 187
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 174
def name [:name] end