不要在 SchemaCrawler 图中显示与不可见表的关系

Do not show relations to invisible tables in SchemaCrawler diagram

我在 Windows 7 上使用 schemacrawler-14.16.03。 我的命令是:

schemacrawler.cmd -server=postgresql -host=hostname -port=5432 -database=db -schemas=public -user=user -password=***-sslmode=require -loglevel=INFO -outputformat png -infolevel=standard -command=schema -outputfile=somefile.png

我想显示一组表以及它们之间的关系。我编辑了 schemacrawler.config.properties schemacrawler.table.pattern.include 并且很容易得到我需要的表格。但是图表包含这些表和其他表之间的所有关系(在图表中不可见)。

我尝试更改不同的配置选项但无法隐藏这些关系。我怎样才能隐藏它们?

这是您可以尝试的另一种方法。在 schemacrawler.config.properties 中,让 schemacrawler.table.pattern.include 包括所有表 (.*)。

使用如下所示的 -grepcolumns 技巧仅包含您想要的表格,并使用 -only-matching 排除不可见表格的链接。

在一行中尝试以下命令: schemacrawler.cmd -server=postgresql -host=hostname -port=5432 -database=db -schemas=public -user=user -password=*** -infolevel=standard -command=schema -only-matching -grepcolumns=.*\.(YOUR TABLE PATTERN)\..* -outputfile=somefile.png

苏阿莱赫·法塔希,SchemaCrawler