Skip to content

postgrelize / MergeMatchedAction

Interface: MergeMatchedAction<T> ​

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

One WHEN MATCHED / WHEN NOT MATCHED BY SOURCE action of merge.

Set exactly one of update, delete or nothing.

Example ​

ts
const action: MergeMatchedAction<Product> = { where: { active: true }, update: { price: col('source.price') } };

Type Parameters ​

T ​

T

Properties ​

delete? ​

readonly optional delete?: true

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

Delete the target row.


nothing? ​

readonly optional nothing?: true

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

Do nothing.


update? ​

readonly optional update?: Partial<Record<keyof T & string, unknown>>

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

Update the target row with these values / expressions (col('source.attr')).


where? ​

readonly optional where?: unknown

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

Extra condition (WHEN MATCHED AND ...).

Released under the MIT License.