Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0007-physical FR-008
The upsert (commons data 0007-physical FR-008): rows inserted, and the row that is there already updated, so that a load run twice leaves the same rows. The three dialects write it alike (INSERT ... ON CONFLICT (key) DO UPDATE SET ...), so the statement is made here, for bind's reference data and for the extensions that load tables of their own.
Source: commons/data/sql/physical/upsert.ts
0 of 1 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.
upsertfunctionno test imports itfunction upsert(dialect: Dialect, table: string, columns: readonly string[], key: readonly string[], rows: readonly (readonly Literal[])[], schema?: string | undefined): string
An upsert statement.
| Parameter | What it is |
|---|
dialect | how the engine writes names and literals |
table | the table, as written |
columns | the columns, as written |
key | the columns of the key, as written; the rest are updated where the key is there |
rows | the values of each row, in the order of the columns |
Returns: the statement, ending in ;