Class: ROM::SQL::Migration::SchemaDiff::AttributeDiff Private

Inherits:
Object
  • Object
show all
Extended by:
Initializer
Defined in:
lib/rom/sql/migration/schema_diff.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Instance Method Summary collapse

Instance Method Details

#nameObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



66
67
68
# File 'lib/rom/sql/migration/schema_diff.rb', line 66

def name
  attr.name
end

#null?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



70
71
72
# File 'lib/rom/sql/migration/schema_diff.rb', line 70

def null?
  attr.optional?
end

#primary_key?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

API:

  • private



74
75
76
# File 'lib/rom/sql/migration/schema_diff.rb', line 74

def primary_key?
  attr.primary_key?
end

#unwrap(attr) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



78
79
80
# File 'lib/rom/sql/migration/schema_diff.rb', line 78

def unwrap(attr)
  attr.optional? ? SQL::Attribute[attr.right, attr.options].meta(attr.meta) : attr
end