Class: RdbmsSampler::ForeignKey

Inherits:
Object
  • Object
show all
Defined in:
lib/rdbms_sampler/foreign_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(constraint_name, schema, table, key, referenced_schema, referenced_table, referenced_key) ⇒ ForeignKey

Returns a new instance of ForeignKey.



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/rdbms_sampler/foreign_key.rb', line 12

def initialize(constraint_name, schema, table, key,
               referenced_schema, referenced_table, referenced_key)

  @constraint_name = constraint_name
  @schema = schema
  @table = table
  @key = key
  @referenced_schema = referenced_schema
  @referenced_table = referenced_table
  @referenced_key = referenced_key
end

Instance Attribute Details

#constraint_nameObject (readonly)

Returns the value of attribute constraint_name.



4
5
6
# File 'lib/rdbms_sampler/foreign_key.rb', line 4

def constraint_name
  @constraint_name
end

#keyObject (readonly)

Returns the value of attribute key.



7
8
9
# File 'lib/rdbms_sampler/foreign_key.rb', line 7

def key
  @key
end

#referenced_keyObject (readonly)

Returns the value of attribute referenced_key.



10
11
12
# File 'lib/rdbms_sampler/foreign_key.rb', line 10

def referenced_key
  @referenced_key
end

#referenced_schemaObject (readonly)

Returns the value of attribute referenced_schema.



8
9
10
# File 'lib/rdbms_sampler/foreign_key.rb', line 8

def referenced_schema
  @referenced_schema
end

#referenced_tableObject (readonly)

Returns the value of attribute referenced_table.



9
10
11
# File 'lib/rdbms_sampler/foreign_key.rb', line 9

def referenced_table
  @referenced_table
end

#schemaObject (readonly)

Returns the value of attribute schema.



5
6
7
# File 'lib/rdbms_sampler/foreign_key.rb', line 5

def schema
  @schema
end

#tableObject (readonly)

Returns the value of attribute table.



6
7
8
# File 'lib/rdbms_sampler/foreign_key.rb', line 6

def table
  @table
end