IF Commons GitHub

governance/relations

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0002-estate-query-relations FR-001

The relations of an estate, as data: each has a name, a sentence, and columns with a type and a sentence. The catalog the guard binds a query to, the help query tables prints and the documentation are all made from this one list, so that no relation is described twice.

import { RELATIONS, relationNamed } from "./relations.ts";
relationNamed("asset")?.columns.map((c) => c.name); // ["id", "kind", "state", "origin", "install"]

Source: commons/estate-query/src/governance/relations.ts

1 of 10 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

governance.RELATIONSconstno test imports it
const RELATIONS: readonly Relation[]

Every relation, in the order query tables lists them.

governance.relationNamedfunctionno test imports it
function relationNamed(name: string): Relation | undefined

The relation of a name, or nothing.

governance.Columntypeno test imports it
type Column = { readonly name: string; readonly type: ColumnType; readonly summary: string };

A column of a relation.

governance.ColumnTypetypeno test imports it
type ColumnType = "int" | "text" | "bool" | "timestamp";

The types of a column: whole numbers, text, true or false, and an instant or a day as text in ISO 8601 (which sorts as time does).

governance.Relationtypeno test imports it
type Relation = { readonly name: string; readonly summary: string; readonly columns: readonly Column[] };

A relation of the estate.

RELATIONSconst
const RELATIONS: readonly Relation[]

Every relation, in the order query tables lists them.

Imported by 10 tests of the run (10 passed, 0 failed): the library's results

relationNamedfunctionno test imports it
function relationNamed(name: string): Relation | undefined

The relation of a name, or nothing.

Columntypeno test imports it
type Column = { readonly name: string; readonly type: ColumnType; readonly summary: string };

A column of a relation.

ColumnTypetypeno test imports it
type ColumnType = "int" | "text" | "bool" | "timestamp";

The types of a column: whole numbers, text, true or false, and an instant or a day as text in ISO 8601 (which sorts as time does).

Relationtypeno test imports it
type Relation = { readonly name: string; readonly summary: string; readonly columns: readonly Column[] };

A relation of the estate.

Titles, headings, exports, tables, columns and requirements. Esc closes.