Class: Flydata::Parser::Mysql::MysqlTable
- Inherits:
-
Object
- Object
- Flydata::Parser::Mysql::MysqlTable
- Defined in:
- lib/flydata/parser/mysql/dump_parser.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#primary_keys ⇒ Object
Returns the value of attribute primary_keys.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
- #add_column(column) ⇒ Object
-
#initialize(table_name, columns = {}, primary_keys = []) ⇒ MysqlTable
constructor
A new instance of MysqlTable.
Constructor Details
#initialize(table_name, columns = {}, primary_keys = []) ⇒ MysqlTable
Returns a new instance of MysqlTable.
31 32 33 34 35 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 31 def initialize(table_name, columns = {}, primary_keys = []) @table_name = table_name @columns = columns @primary_keys = primary_keys end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
37 38 39 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 37 def columns @columns end |
#primary_keys ⇒ Object
Returns the value of attribute primary_keys.
37 38 39 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 37 def primary_keys @primary_keys end |
#table_name ⇒ Object
Returns the value of attribute table_name.
37 38 39 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 37 def table_name @table_name end |
Instance Method Details
#add_column(column) ⇒ Object
39 40 41 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 39 def add_column(column) @columns[column[:column_name]] = column end |