]> source.dussan.org Git - jackcess.git/commitdiff
add table debug methods
authorJames Ahlborn <jtahlborn@yahoo.com>
Fri, 4 Aug 2006 12:26:15 +0000 (12:26 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Fri, 4 Aug 2006 12:26:15 +0000 (12:26 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@89 f203690c-595d-4dc9-a70b-905162fa7fd2

test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java

index f11e1e1fa1065f5fcf930b8502ca5754bb0d3869..a4d6a71bf86e7898edb934b666d5ccffa9375cef 100644 (file)
@@ -491,5 +491,22 @@ public class DatabaseTest extends TestCase {
     columns.add(col);
     db.createTable("test", columns);
   }
+
+  private static void dumpDatabase(Database mdb) throws Exception {
+    System.out.println("DATABASE:");
+
+    for(String tableName : mdb.getTableNames()) {
+      dumpTable(mdb.getTable(tableName));
+    }
+  }
+
+  private static void dumpTable(Table table) throws Exception {
+    System.out.println("TABLE: " + table.getName());
+    table.reset();
+    Object row = null;
+    while((row = table.getNextRow()) != null) {
+      System.out.println(row);
+    }
+  }
   
 }