sql/extensions/idempotency/inline
Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0012-sql-idempotency FR-008
A guard in plain SQL (commons data 0012-sql-idempotency FR-008): where the dialect has a procedural block, a guarded statement is written as one block that runs the statement only if its guard says so, so that a script that no runner reads still does no harm run twice. Where it has none, the answer says so and the statement is not written.
Source: commons/data/sql/extensions/idempotency/inline.ts
1 of 2 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
function guardInline(statement: StepStatement, dialect: Dialect): Inline
A statement as plain SQL that is safe to run twice.
| Parameter | What it is |
|---|
statement | the statement, guarded or not |
dialect | the dialect |
Returns: the SQL, or why the dialect cannot carry the guard
Imported by 7 tests of the run (7 passed, 0 failed): the library's results
Inlinetypeno test imports ittype Inline = { readonly kind: "sql"; readonly sql: string } | { readonly kind: "refused"; readonly why: string };
A statement written as plain SQL, or why it cannot be.