From: James Ahlborn Date: Fri, 4 Aug 2006 12:26:15 +0000 (+0000) Subject: add table debug methods X-Git-Tag: rel_1_1_6~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7bb505d7ea7e7ae46f0789ff239072b5af070ebf;p=jackcess.git add table debug methods git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@89 f203690c-595d-4dc9-a70b-905162fa7fd2 --- diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java index f11e1e1..a4d6a71 100644 --- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java @@ -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); + } + } }