IF Commons GitHub

sql/extensions/rollout/views

Written to: 4 requirements: 4 proved, 0 partly, 0 failing, 0 with no test recorded. 0020-sql-parallel-versions FR-003, 0020-sql-parallel-versions FR-004, 0020-sql-parallel-versions FR-005, 0020-sql-parallel-versions FR-006

The views of each live version (commons data 0020-sql-parallel-versions FR-003 to FR-006): a schema of its own for each version, with a view of each of the version's tables under the version's names, over the tables the expanded schema makes. A column the version knows by another name is selected under the version's; a column of another version is not shown.

Source: commons/data/sql/extensions/rollout/views.ts

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

LiveVersioninterfaceno test imports it
interface LiveVersion

A live version: its label and the logical schema it was made from.

MemberTypeWhat it is
labelstring
schemaLogicalSchema
Rolloutinterfaceno test imports it
interface Rollout

The settings with every default filled.

MemberTypeWhat it is
patternstring
primarystring | undefined
grantsboolean
RolloutSettingsinterfaceno test imports it
interface RolloutSettings

What a project says of the overlap; what is not said is the default.

MemberTypeWhat it is
pattern?stringThe name of a version's schema, with {label} where the label goes; api_{label} by default.
primary?stringThe label of the version whose views the protection layer makes, which are not made here.
grants?"off" | "on"Whether the roles governance names are granted on a version's views; on by default.
retireStatementsfunction
function retireStatements(version: LiveVersion, dialect: Dialect, naming: Naming, given?: RolloutSettings): readonly string[]

The statements that retire a version: its schema is dropped, or its views where the dialect has no schemas.

ParameterWhat it is
versionthe version
dialectthe dialect
namingthe case styles
givenwhat a project says

Returns: the statements, safe to run twice

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

schemaOfconst
const schemaOf: (label: string, settings: Rollout) => string

The name of a version's schema.

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

versionViewsfunction
function versionViews(versions: readonly LiveVersion[], given?: RolloutSettings): StatementSource

The source of the views of the live versions.

ParameterWhat it is
versionsthe live versions, oldest first
givenwhat a project says

Returns: a statement source

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

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