Locks

Queries within a transaction can be performed with locks

  1. return User.findAll({
  2. limit: 1,
  3. lock: true,
  4. transaction: t1
  5. })

Queries within a transaction can skip locked rows

  1. return User.findAll({
  2. limit: 1,
  3. lock: true,
  4. skipLocked: true,
  5. transaction: t2
  6. })