Possible options for row locking. Used in conjunction with find calls:
find
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
Postgres 9.3+ only
Generated using TypeDoc
Possible options for row locking. Used in conjunction with
find
calls:Usage:
Postgres also supports specific locks while eager loading by using OF:
UserModel will be locked but other models won't be!
Read more on transaction locks here