Class: Mysql
- Inherits:
-
Object
- Object
- Mysql
- Defined in:
- lib/metamri/mysql_tools.rb
Instance Method Summary collapse
Instance Method Details
#summary ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/metamri/mysql_tools.rb', line 5 def summary self.list_tables.each do |tbl| next if tbl =~ /^tws/ puts "+" * 160 puts "%80s" % tbl puts "+" * 160 columns = self.query("select * from #{tbl}").fetch_hash.keys columns.in_chunks_of(6).each do |chunk| puts "%-25s " * chunk.size % chunk end puts "\n\n" end end |