sql/extensions/safety/mod
Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0015-sql-safety FR-011
The safety features (commons data 0015-sql-safety ): quarantine instead of drop, lock discipline and verification, each on by default and each a transform of the lifecycle. safety gives what a project passes on: the transforms, in the order that makes them agree, and the retry for execute; safetyExtension contributes the transforms through the engine; purge is the step a person asks for to destroy a quarantine table.
const s = safety ();
plan (from, schema, { dialect }, { transforms: s.transforms });
execute (plan, driver, dialect, { empty, retry: s.retry (dialect) });Source: commons/data/sql/extensions/safety/mod.ts
2 of 3 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
SafetyKitinterface no test imports it interface SafetyKit What a project passes on for a set of settings.
Member Type What it is settingsSafetytransformsreadonly StepTransform[]The transforms, in the order they are given to plan: quarantine, locks, validation, verification. retry(dialect: Dialect) => { readonly attempts: number; readonly delayMs: number; readonly when: (message: string) => boolean; readonly sleep?: ((ms: number) => Promise<void>) | undefined; } | undefinedWhat execute is given to try a step again on a lock timeout. purge(options: Omit<PurgeOptions, "settings">) => Result<Plan, readonly { readonly kind: "not-quarantine"; readonly name: string; }[]>A plan of one step that drops quarantine tables.
function safety (given ?: SafetySettings ): SafetyKit The safety features for a set of settings.
Parameter What it is givenwhat a project says of safety
Returns: what a project passes on
Imported by 38 tests of the run (38 passed, 0 failed): the library's results
function safetyExtension (given ?: SafetySettings , version ?: string ): Result <Extension , IdError >The transforms as an extension of the engine, sql.lifecycle.safety.
Parameter What it is givenwhat a project says of safety versionthe extension's version
Returns: the extension, or why its identifier is not one
Imported by 10 tests of the run (10 passed, 0 failed): the library's results