postgrelize / excluded
Function: excluded() ​
excluded(
attribute):Excluded
Defined in: src/expressions/methods.ts:153
postgrelize extensionReferences the value proposed for insertion (EXCLUDED."column") inside an onConflict update. PostgreSQL extension.
Parameters ​
attribute ​
string
Model attribute name.
Returns ​
Excluded column expression.
Example ​
ts
const rows = [{ key: 'home', hits: 1 }];
await Product.bulkCreate(rows, {
onConflict: { target: ['key'], action: { update: { hits: excluded('hits') } } },
});