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? ​
readonlyoptionaldelete?:true
Defined in: src/model/merge-options.ts:20
Delete the target row.
nothing? ​
readonlyoptionalnothing?:true
Defined in: src/model/merge-options.ts:22
Do nothing.
update? ​
readonlyoptionalupdate?:Partial<Record<keyofT&string,unknown>>
Defined in: src/model/merge-options.ts:18
Update the target row with these values / expressions (col('source.attr')).
where? ​
readonlyoptionalwhere?:unknown
Defined in: src/model/merge-options.ts:16
Extra condition (WHEN MATCHED AND ...).