Class: Foreigner::ConnectionAdapters::TableDefinition::ForeignKey

Inherits:
Struct
  • Object
show all
Defined in:
lib/foreigner/connection_adapters/sqlite3_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



37
38
39
# File 'lib/foreigner/connection_adapters/sqlite3_adapter.rb', line 37

def base
  @base
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



37
38
39
# File 'lib/foreigner/connection_adapters/sqlite3_adapter.rb', line 37

def options
  @options
end

#to_tableObject

Returns the value of attribute to_table

Returns:

  • (Object)

    the current value of to_table



37
38
39
# File 'lib/foreigner/connection_adapters/sqlite3_adapter.rb', line 37

def to_table
  @to_table
end

Instance Method Details

#to_sqlObject Also known as: to_s



39
40
41
# File 'lib/foreigner/connection_adapters/sqlite3_adapter.rb', line 39

def to_sql
  base.foreign_key_definition(to_table, options)
end