IF Commons GitHub

sql/extensions/idempotency/mod

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0012-sql-idempotency FR-006

The idempotency extension (commons data 0012-sql-idempotency): a feature of the lifecycle, on by default, that makes every generated step safe to repeat. idempotency is the transform; idempotencyExtension contributes it through the engine's point lifecycle.transform; defaultIdempotency is the default composition, which the strategies include; planOptions gives what plan is given for the settings.

import { plan } from "@intellectual-frontiers/data/sql/lifecycle";
import { idempotency } from "@intellectual-frontiers/data/sql/extensions/idempotency";
plan(from, schema, { dialect }, { transforms: [idempotency()] });

Source: commons/data/sql/extensions/idempotency/mod.ts

3 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.

idempotencyExtensionfunction
function idempotencyExtension(settings?: IdempotencySettings, version?: string): Result<Extension, IdError>

The idempotency transform as an extension of the engine, sql.lifecycle.idempotency.

ParameterWhat it is
settingswhat the project says of idempotency
versionthe extension's version

Returns: the extension, or why its identifier is not one

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

defaultIdempotencyfunction
function defaultIdempotency(settings?: IdempotencySettings): Result<readonly Extension[], IdError>

The default composition of idempotency: the extension, on.

ParameterWhat it is
settingswhat the project says of idempotency

Returns: the extensions, or why an identifier is not one

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

planOptionsconst
const planOptions: (settings?: IdempotencySettings) => Pick<PlanOptions, "requireIdempotent" | "transforms">

What plan is given for the settings: the transform and whether a step that only the ledger keeps from running twice is refused.

ParameterWhat it is
settingswhat the project says of idempotency

Returns: the part of the options of plan

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

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