Skip to content

postgrelize / excluded

Function: excluded() ​

excluded(attribute): Excluded

Defined in: src/expressions/methods.ts:153

postgrelize extension

References the value proposed for insertion (EXCLUDED."column") inside an onConflict update. PostgreSQL extension.

Parameters ​

attribute ​

string

Model attribute name.

Returns ​

Excluded

Excluded column expression.

Example ​

ts
const rows = [{ key: 'home', hits: 1 }];
await Product.bulkCreate(rows, {
  onConflict: { target: ['key'], action: { update: { hits: excluded('hits') } } },
});

Released under the MIT License.