Class: ActiveRecord::ConnectionAdapters::IBM_DBAdapter::UniqueConstraintDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_record/connection_adapters/ibm_db_adapter.rb

Overview

end of class TableDefinition

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



894
895
896
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 894

def column
  @column
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



894
895
896
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 894

def options
  @options
end

#table_nameObject

Returns the value of attribute table_name

Returns:

  • (Object)

    the current value of table_name



894
895
896
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 894

def table_name
  @table_name
end

Instance Method Details

#deferrableObject



899
900
901
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 899

def deferrable
  options[:deferrable]
end

#defined_for?(name: nil, column: nil, **options) ⇒ Boolean

Returns:

  • (Boolean)


911
912
913
914
915
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 911

def defined_for?(name: nil, column: nil, **options)
  (name.nil? || self.name == name.to_s) &&
    (column.nil? || Array(self.column) == Array(column).map(&:to_s)) &&
    options.all? { |k, v| self.options[k].to_s == v.to_s }
end

#export_name_on_schema_dump?Boolean

Returns:

  • (Boolean)


907
908
909
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 907

def export_name_on_schema_dump?
  !ActiveRecord::SchemaDumper.unique_ignore_pattern.match?(name) if name
end

#nameObject



895
896
897
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 895

def name
  options[:name]
end

#using_indexObject



903
904
905
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 903

def using_index
  options[:using_index]
end