Locks
Queries within a transaction
can be performed with locks
return User.findAll({
limit: 1,
lock: true,
transaction: t1
})
Queries within a transaction can skip locked rows
return User.findAll({
limit: 1,
lock: true,
skipLocked: true,
transaction: t2
})