Skip to main content

Variable: DEFAULT_SCHEMA_NAME

const DEFAULT_SCHEMA_NAME: "public" = 'public';

Stable id encoding shared by the diagram model and the layout file.

A table id is <schema>.<table>. Each segment is written as is, unless it is empty, contains one of . " \ : , ( ), or starts with a relationship-operator character (< > - ?). Such a segment is wrapped in double quotes, with " and `` escaped by a backslash: Table a."b.c" → a."b.c", Table "a.b".c → "a.b".c. The encoding is injective, so two different (schema, name) pairs never share an id, and a table id can never look like a note: / group: id.

A ref id is derived from its endpoints and relationship operator: ref:<tableId>(<col>,<col>)<op><tableId>(<col>), columns encoded like segments, plus #<n> (n ≥ 2) only when several refs have exactly the same endpoints and operator.