Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Sequel::Dataset
- def to_table(file = $stdout)
- records = self.all
- if records.empty?
- file.puts "No records found"
- file.puts self.sql
- else
- file.puts records.first.keys.join("\t")
- records.each{|row| file.puts row.values.join("\t")}
- end
- end
- end
Add Comment
Please, Sign In to add comment