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.
26 27 28 29 30 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 26 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.
32 33 34 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 32 def columns @columns end |
#primary_keys ⇒ Object
Returns the value of attribute primary_keys.
32 33 34 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 32 def primary_keys @primary_keys end |
#table_name ⇒ Object
Returns the value of attribute table_name.
32 33 34 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 32 def table_name @table_name end |
Instance Method Details
#add_column(column) ⇒ Object
34 35 36 |
# File 'lib/flydata/parser/mysql/dump_parser.rb', line 34 def add_column(column) @columns[column[:column_name]] = column end |