viewsSourcefunctionfunction viewsSource(definitions: readonly ViewDefinition[]): StatementSourceThe source of the views.
| Parameter | What it is |
|---|---|
definitions | the views, in the order they are made |
Returns: a statement source
Views (commons data 0009-sql-features FR-005 to FR-007): a view is derived, so it is not governance; it is made from a typed definition of tables and columns named as governance names them (partyId), written by the case style, and replaced where the dialect can say so or dropped and made again where it cannot.
viewsSourcefunctionfunction viewsSource(definitions: readonly ViewDefinition[]): StatementSourceThe source of the views.
| Parameter | What it is |
|---|---|
definitions | the views, in the order they are made |
Returns: a statement source
ColumnRefinterfaceno test imports itinterface ColumnRefA column of a table, as governance names them.
| Member | Type | What it is |
|---|---|---|
table | string | |
column | string |
Conditiontypeno test imports ittype Condition = ColumnRef & ({ readonly is: "null" } | { readonly is: "notNull" } | { readonly equals: Literal });What a row must meet: a column is null, is not null, or is equal to a literal.
Joininterfaceno test imports itinterface JoinA join to another table, where two columns are equal.
| Member | Type | What it is |
|---|---|---|
table | string | |
on | readonly [ColumnRef, ColumnRef] |
ViewColumninterfaceno test imports itinterface ViewColumn extends ColumnRefA column a view shows, and the name it is shown by where that is not the column's.
| Member | Type | What it is |
|---|---|---|
as? | string | |
table | string | |
column | string |
ViewDefinitioninterfaceno test imports itinterface ViewDefinitionA view.
| Member | Type | What it is |
|---|---|---|
name | string | Its name as governance writes names, lower camel case. |
description | string | |
from | string | The table it is drawn from. |
joins? | readonly Join[] | |
columns | readonly ViewColumn[] | |
where? | readonly Condition[] |