Class: DbSchema::Normalizer::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/db_schema/normalizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, hash, enum_names, connection) ⇒ Table

Returns a new instance of Table.



63
64
65
66
67
68
# File 'lib/db_schema/normalizer.rb', line 63

def initialize(table, hash, enum_names, connection)
  @table      = table
  @hash       = hash
  @enum_names = enum_names
  @connection = connection
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



61
62
63
# File 'lib/db_schema/normalizer.rb', line 61

def connection
  @connection
end

#enum_namesObject (readonly)

Returns the value of attribute enum_names.



61
62
63
# File 'lib/db_schema/normalizer.rb', line 61

def enum_names
  @enum_names
end

#hashObject (readonly)

Returns the value of attribute hash.



61
62
63
# File 'lib/db_schema/normalizer.rb', line 61

def hash
  @hash
end

#tableObject (readonly)

Returns the value of attribute table.



61
62
63
# File 'lib/db_schema/normalizer.rb', line 61

def table
  @table
end

Instance Method Details

#normalized_tableObject



70
71
72
73
# File 'lib/db_schema/normalizer.rb', line 70

def normalized_table
  create_temporary_table!
  read_temporary_table
end