簡化數據庫結構操作的Java API - SchemaCrawler 8.11 發布

fmms 12年前發布 | 7K 次閱讀 Java

SchemaCrawler提供一組用于增強標準JDBC Metadata的API.SchemaCrawler還包含一個命令行工具能夠將數據庫結構和數據以一種易讀的形式輸出.示例代碼:

final SchemaCrawlerOptions options = new SchemaCrawlerOptions();
// Set what details are required in the schema - this affects the
// time taken to crawl the schema
options.setSchemaInfoLevel(SchemaInfoLevel.standard());

final Database database = SchemaCrawlerUtility.getDatabase(connection, options); for (final Schema schema: database.getSchemas()) { System.out.println(schema); for (final Table table: schema.getTables()) { System.out.println("o--> " + table); for (final Column column: table.getColumns()) { System.out.println(" o--> " + column); } } }</pre>SchemaCrawler 8.11 發布,

8.11 版本改進記錄:

This release adds the ability to configure SchemaCrawler linters and a new lint for useless surrogate keys. You can now tag tables and columns with additional metadata attributes from SQL queries.

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!