I am debuging some database code on the Java Platform and it would be convenient to dump the contents of a database table at various points to a log file.
Is there a java library which will take a JDBC connection and a table name and dump all of the contents to a string (ideally formatted into columns properly)?
output should look something like:
| col1 | col2 | | 22 | 55 | | 23 | 99 |
I know I could write this my self but it feels like the kind of thing that may already be out there. However after lots of searching I have not seen anything.
Would also be interested in any java library for just formatting the ASCI table as I may have to solve the problem my self.