Class: ActiveFacts::Persistence::ForeignKey

Inherits:
Object
  • Object
show all
Defined in:
lib/activefacts/persistence/foreignkey.rb

Instance Method Summary collapse

Constructor Details

#initialize(from, to, fk_ref, from_columns, to_columns) ⇒ ForeignKey

:nodoc:



25
26
27
28
# File 'lib/activefacts/persistence/foreignkey.rb', line 25

def initialize(from, to, fk_ref, from_columns, to_columns) #:nodoc:
  @from, @to, @fk_ref, @from_columns, @to_columns =
    from, to, fk_ref, from_columns, to_columns
end

Instance Method Details

#fromObject

What table (Concept) is the FK from?



11
# File 'lib/activefacts/persistence/foreignkey.rb', line 11

def from; @from; end

#from_columnsObject

What columns in the from table form the FK



20
# File 'lib/activefacts/persistence/foreignkey.rb', line 20

def from_columns; @from_columns; end

#referenceObject

What reference created the FK?



17
# File 'lib/activefacts/persistence/foreignkey.rb', line 17

def reference; @reference; end

#toObject

What table (Concept) is the FK to?



14
# File 'lib/activefacts/persistence/foreignkey.rb', line 14

def to; @to; end

#to_columnsObject

What columns in the to table form the identifier



23
# File 'lib/activefacts/persistence/foreignkey.rb', line 23

def to_columns; @to_columns; end