This macro was added in version 5.4 of the PlantUML Plugin.
Parameter
Parameter datasource is required, all others are optional.
Name
Description
datasource
Name of datasources to visualize
Datasources must be configured by a Confluence administrator before they can be used. A short guide can be found here.
schemaName
Name of schema to visualize. The table name is prefixed with the schema name if none is selected.
tableTypes
Comma separated list of types to show in graphics. The available types depend on the database. They can be determined with the database-info macro. Common ones are:
TABLE (default)
VIEW
INDEX
SEQUENCE
The type will be shown as stereotype above the table name if more than one is selected.
tableNameFilter
Show only tables with these names in generated graphic.
Wildcards _ and % can be used as in a SQL SELECT. An additional filtering is possible with tableNameRegEx.
Note
This selection is done inside the database. It will be faster than tableNameRegEx in most cases.
It depends on the database whether this is case sensitive or case insensitive
columnNameFilter
Show only columns with these names in generated graphic.
It works like tableNameFilter.
tableNameRegEx
Show only tables with these names in generated graphic.
Table names are defined as regular expression, e.g. show all tables whose names start with A,B,C or D or end with NEW:
Code Block
([A-D].*|.*NEW)
Note
tableNameFilter is executed before tableNameRegEx
Regular expressions are case sensitive but you can place (?i) in front to make them insensitive
| does not work in Confluence 3 as this character separates paramters. It requires Confluence 4.
columnNameRegEx
Show only columns with these names in generated graphic.
It works like tableNameRegEx.
showColumns
If true column names and their data types are shown.
showComments
If true and column comments comment exists they it will be shown after --.
Note: Comments are an elegant way to document a database schema but they are not part of the SQL standard. Some databases support them (e.g. PostgreSQL,Oracle), others do not (MySQL).
(available since 5.4.1)
showDefaultValues
If true and a default values exist they it will be shown after =.
(available since 5.4.1)
showIndexes
If truethe indexes of each table are shown below the column names.
Indexes can also be shown as separate boxes by adding INDEX to the list of tableTypesbut this will need more space on the graphic.
useForeignKeys
If true foreign keys will be used to determine relations between tables.They are drawn as lines.
(available since 5.4.1)
relationRegEx
Relations between tables can also be drawn without foreign key constraints. This requires a consistent naming schema and a regular expression to describe how tables are related.
The regular expression is checked against: <tablename1>.<columname1> <tablename2>.<columname2>
A relation between table <tablename1> and <tablename2> is drawn when the regular expression matches.
Example: The primary key of an table is named id. A column which refers to this is named <tablename>_id. A relation between tables person and team has to be drawn if there is for example: person.id and team.person_id. The regular expression hast to match: