Options
All
  • Public
  • Public/Protected
  • All
Menu

Enumeration LOCK

Possible options for row locking. Used in conjunction with find calls:

Usage:

import { LOCK } from '@sequelize/core';

Model.findAll({
transaction,
lock: LOCK.UPDATE,
});

Postgres also supports specific locks while eager loading by using OF:

import { LOCK } from '@sequelize/core';

UserModel.findAll({
transaction,
lock: {
level: LOCK.KEY_SHARE,
of: UserModel,
},
});

UserModel will be locked but other models won't be!

Read more on transaction locks here

Index

Enumeration members

KEY_SHARE = "KEY SHARE"

Postgres 9.3+ only

NO_KEY_UPDATE = "NO KEY UPDATE"

Postgres 9.3+ only

SHARE = "SHARE"
UPDATE = "UPDATE"

Generated using TypeDoc