sql/extensions/integrations/load
Written to: 7 requirements: 7 proved, 0 partly, 0 failing, 0 with no test recorded. 0022-sql-integrations FR-002, 0022-sql-integrations FR-003, 0022-sql-integrations FR-004, 0022-sql-integrations FR-005, 0022-sql-integrations FR-006, 0022-sql-integrations FR-007 and 1 more
A load (commons data 0022-sql-integrations): the rows landed in a typed temporary table, checked, counted and loaded in one transaction, and recorded in a ledger. Where anything is wrong the target is as it was, and the reason is a value.
Source: commons/data/sql/extensions/integrations/load.ts
2 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.
type LoadError =
| { readonly kind: "adapter"; readonly adapter: string; readonly message: string }
| { readonly kin… (555 characters)
type LoadError =
| { readonly kind: "adapter"; readonly adapter: string; readonly message: string }
| { readonly kind: "source"; readonly message: string }
| { readonly kind: "unsupported"; readonly why: string }
| { readonly kind: "duplicate-keys"; readonly count: number }
| { readonly kind: "null-required"; readonly column: string; readonly count: number }
| { readonly kind: "empty-snapshot" }
| { readonly kind: "delete-share"; readonly share: number; readonly max: number }
| { readonly kind: "database"; readonly message: string };
Why a load changed nothing.
Imported by 7 tests of the run (7 passed, 0 failed): the library's results
interface LoadReport
What a load did.
| Member | Type | What it is |
|---|
name | string | |
outcome | "loaded" | "unchanged" | |
landed | number | |
inserted | number | |
updated | number | |
deleted | number | |
hash | string | The hash of the landed rows. |
Imported by 7 tests of the run (7 passed, 0 failed): the library's results