Class: StructuredDataToSql::MysqlDumpXml::TableDiscovery::Result
- Inherits:
-
Struct
- Object
- Struct
- StructuredDataToSql::MysqlDumpXml::TableDiscovery::Result
- Defined in:
- lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb
Instance Attribute Summary collapse
-
#bytes_scanned ⇒ Object
Returns the value of attribute bytes_scanned.
-
#files ⇒ Object
Returns the value of attribute files.
-
#files_found ⇒ Object
Returns the value of attribute files_found.
-
#files_skipped ⇒ Object
Returns the value of attribute files_skipped.
-
#skipped ⇒ Object
Returns the value of attribute skipped.
-
#table_metadata ⇒ Object
Returns the value of attribute table_metadata.
-
#tables ⇒ Object
Returns the value of attribute tables.
-
#truncated ⇒ Object
Returns the value of attribute truncated.
Instance Method Summary collapse
Instance Attribute Details
#bytes_scanned ⇒ Object
Returns the value of attribute bytes_scanned
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def bytes_scanned @bytes_scanned end |
#files ⇒ Object
Returns the value of attribute files
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def files @files end |
#files_found ⇒ Object
Returns the value of attribute files_found
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def files_found @files_found end |
#files_skipped ⇒ Object
Returns the value of attribute files_skipped
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def files_skipped @files_skipped end |
#skipped ⇒ Object
Returns the value of attribute skipped
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def skipped @skipped end |
#table_metadata ⇒ Object
Returns the value of attribute table_metadata
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def @table_metadata end |
#tables ⇒ Object
Returns the value of attribute tables
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def tables @tables end |
#truncated ⇒ Object
Returns the value of attribute truncated
25 26 27 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 25 def truncated @truncated end |
Instance Method Details
#sorted_tables ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/structured_data_to_sql/mysql_dump_xml/table_discovery.rb', line 37 def sorted_tables sized, unsized = tables.partition do |table| TableDiscovery.([table]) end sized.sort_by do |table| = [table] || {} [ -TableDiscovery.total_size(), -[:rows].to_i, table ] end + unsized.sort end |