[ rubbish-db ]

ソース

RubbishDatabase dbh = new RubbishDatabase();
dbh.connect("jdbc:hsqldb:hsql://localhost", "sa", "");
Map[] rows = dbh.getColumns("BOOK");
dbh.disconnect();
println(new TabularFormat(rows));

結果

+---------+-----------+----------+-----------+---------+---------+-----------+-------------+--------------+--------------+--------+-------+----------+-------------+----------------+-----------------+----------------+-----------+------------+------------+-----------+----------------+--------+
|TABLE_CAT|TABLE_SCHEM|TABLE_NAME|COLUMN_NAME|DATA_TYPE|TYPE_NAME|COLUMN_SIZE|BUFFER_LENGTH|DECIMAL_DIGITS|NUM_PREC_RADIX|NULLABLE|REMARKS|COLUMN_DEF|SQL_DATA_TYPE|SQL_DATETIME_SUB|CHAR_OCTET_LENGTH|ORDINAL_POSITION|IS_NULLABLE|SCOPE_CATLOG|SCOPE_SCHEMA|SCOPE_TABLE|SOURCE_DATA_TYPE|TYPE_SUB|
+---------+-----------+----------+-----------+---------+---------+-----------+-------------+--------------+--------------+--------+-------+----------+-------------+----------------+-----------------+----------------+-----------+------------+------------+-----------+----------------+--------+
|         |PUBLIC     |BOOK      |PUBLISHER  |1        |CHAR     |2          |4            |              |              |0       |       |          |1            |                |4                |1               |NO         |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |ID         |1        |CHAR     |3          |6            |              |              |0       |       |          |1            |                |6                |2               |NO         |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |TITLE      |12       |VARCHAR  |256        |512          |              |              |0       |       |          |12           |                |512              |3               |NO         |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |AUTHOR     |12       |VARCHAR  |256        |512          |              |              |1       |       |          |12           |                |512              |4               |YES        |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |ISSUE_DATE |91       |DATE     |           |8            |              |              |1       |       |          |9            |1               |                 |5               |YES        |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |UPDATE_DATE|93       |TIMESTAMP|6          |12           |              |              |0       |       |          |9            |3               |                 |6               |NO         |            |            |           |                |1       |
|         |PUBLIC     |BOOK      |CREATE_DATE|93       |TIMESTAMP|6          |12           |              |              |0       |       |          |9            |3               |                 |7               |NO         |            |            |           |                |1       |
+---------+-----------+----------+-----------+---------+---------+-----------+-------------+--------------+--------------+--------+-------+----------+-------------+----------------+-----------------+----------------+-----------+------------+------------+-----------+----------------+--------+