d2.relation_schema: Generate D2 input text to plot relation schemas

View source: R/plot.r

d2.relation_schemaR Documentation

Generate D2 input text to plot relation schemas

Description

Produces text input for D2 to make a diagram of a given relation schema, usually rendered with SVG.

Usage

## S3 method for class 'relation_schema'
d2(x, name = NA_character_, ...)

Arguments

x

a relation schema, as given by relation_schema or synthesise.

name

a character scalar, giving the name of the schema, if any.

...

further arguments passed to or from other methods.

Details

Each relation in the schema is presented as a set of rows, one for each attribute in the relation. These rows do not include information about the attribute classes.

Value

A scalar character, containing text input for D2.

See Also

The generic d2.


autodb documentation built on Nov. 5, 2025, 6:49 p.m.