Layerinterfaceno test imports itinterface LayerA layer of a model.
| Member | Type | What it is |
|---|---|---|
id | string | |
title | string | |
summary | string | |
kinds | readonly string[] |
Describing models in layers (commons data 0057-sql-describe): the models of governance, the logical schema that projects from them and the physical forms of that schema (SQL for each dialect, the typed tables of 0053) as plain data a documentation generator reads. One LayeredModel for each module: its elements in each layer with their stable ids, the words the model gives them, where they are written and what is said of them; the trace from an element to what it is made into; and the findings (what has no definition, personal data that is held for no purpose). It is pure: it imports no documentation library and returns values that are checked against the generator's types by their shape alone.
The layers are written for a developer and for an agent: each says what it is, which code writes it and what may be edited, so that the generated pages say how to use the layers and not only what they hold.
Layerinterfaceno test imports itinterface LayerA layer of a model.
| Member | Type | What it is |
|---|---|---|
id | string | |
title | string | |
summary | string | |
kinds | readonly string[] |
Traceinterfaceno test imports itinterface TraceAn element made into another.
| Member | Type | What it is |
|---|---|---|
from | string | |
to | string | |
how | string |
Describedinterfaceno test imports itinterface DescribedA model described in layers: structurally the generator's LayeredModel.
| Member | Type | What it is |
|---|---|---|
name | string | |
library | string | |
title | string | |
summary | string | |
subject? | { readonly id: string; readonly title: string; readonly about: string; readonly order: number; } | What the model applies to (subjectOf of governance), where it has a subject. |
layers | readonly Layer[] | |
elements | readonly Element[] | |
trace | readonly Trace[] | |
findings | readonly Finding[] |
DescribeOptionsinterfaceno test imports itinterface DescribeOptionsWhat describing is told.
| Member | Type | What it is |
|---|---|---|
modules | readonly Module[] | The modules of the composition, in the order they are composed. |
dialects | readonly Dialect[] | The dialects whose SQL is shown. |
library? | string | The library the models are of, as the site names it. |
domain? | string | The name of the domain the modules are composed into; models where not given. |
naming? | Naming | |
locate? | ((value: unknown, member?: string | undefined) => Source | undefined) | Where a value is written (a module, a concept, a code list) and, for a member of a concept, where it is: the generator's lens finds them from the exports it knows. |
typedDir? | string | Where the generated typed tables are, relative to the repository's root; commons/data/sql/typed/models where not given. |
DescribeErrortypeno test imports ittype DescribeError = { readonly kind: "compose" | "project" | "bind"; readonly why: string };Why a description could not be made.
LAYERSconstconst LAYERS: readonly Layer[]The layers, with what each is for and how to use it.
typeTextfunctionfunction typeText(t: Datatype): stringA datatype in words.
describeModelsfunctionfunction describeModels(options: DescribeOptions): Result<readonly Described[], DescribeError>Describes the models of a composition in layers.
| Parameter | What it is |
|---|---|
options | the modules, the dialects and where things are written |
Returns: one described model for each module that owns a table or a concept, or why the composition could not be made