sql/extensions/safety/quarantine
Written to: 4 requirements: 4 proved, 0 partly, 0 failing, 0 with no test recorded. 0015-sql-safety FR-004, 0015-sql-safety FR-005, 0015-sql-safety FR-006, 0015-sql-safety FR-007
Quarantine (commons data 0015-sql-safety FR-004 to FR-007): a step that drops a column copies its values, with the table's key, to a table of their own first; a step that drops a table renames it away. Either can be undone by the step's down statements, and nothing is destroyed until a person purges the quarantine table.
Source: commons/data/sql/extensions/safety/quarantine.ts
0 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
purgefunctionno test imports itfunction purge(options: PurgeOptions): Result<Plan, readonly { readonly kind: "not-quarantine"; readonly name: string; }[]>
A plan of one step that drops quarantine tables, which a person asks for by name.
| Parameter | What it is |
|---|
options | what to purge |
Returns: the plan, or why a name is not a quarantine table
PurgeOptionsinterfaceno test imports itinterface PurgeOptions
What purge is given.
| Member | Type | What it is |
|---|
from | string | The hash of the state the database is in: a purge changes no table of the state. |
names | readonly string[] | The names of the quarantine tables to drop, as written. |
dialect | Dialect | |
settings | Safety | |
qualifier? | string | The schema the tables are qualified by. |
quarantinefunctionno test imports itfunction quarantine(settings: Safety): StepTransform
The quarantine transform.
| Parameter | What it is |
|---|
settings | the settings |
Returns: the transform
quarantineNameconstno test imports itconst quarantineName: (naming: Naming, table: string, column: readonly string[] | undefined, suffix: string) => string
The name of a quarantine table: the table's words, the column's and the suffix, written by the case style.