Skip to content

postgrelize / MergeInsertAction

Interface: MergeInsertAction<T> ​

Defined in: src/model/merge-options.ts:35

WHEN NOT MATCHED action of merge.

Set insert or nothing.

Example ​

ts
const action: MergeInsertAction<Product> = { insert: { sku: col('source.sku'), price: 0 } };

Type Parameters ​

T ​

T

Properties ​

insert? ​

readonly optional insert?: true | Partial<Record<keyof T & string, unknown>>

Defined in: src/model/merge-options.ts:39

Values to insert: true copies same-named source columns, or a map of values / expressions.


nothing? ​

readonly optional nothing?: true

Defined in: src/model/merge-options.ts:41

Do nothing.


where? ​

readonly optional where?: unknown

Defined in: src/model/merge-options.ts:37

Extra condition (WHEN NOT MATCHED AND ...); may reference only source columns.

Released under the MIT License.