0

http://sualeh.github.io/SchemaCrawler/how-to.html#apiのドキュメントを参照し ていますが、欲しいものが得られません。返されるテーブルは常に空です。

final Connection connection = ... // Get a MYSQL connection;
final SchemaCrawlerOptions options = new SchemaCrawlerOptions();
options.setSchemaInfoLevel(SchemaInfoLevelBuilder.maximum());
options.setTableInclusionRule(new IncludeAll());
options.setTableNamePattern("*");

final Catalog catalog = SchemaCrawlerUtility.getCatalog(connection, options);

for (final Schema schema: catalog.getSchemas())
{
    Collection<Table> tables = catalog.getTables(schema);
    // 
    // The size of tables is always 0
    // 
    System.out.println(tables);
}
4

1 に答える 1