不要怂,就是干,撸起袖子干!

Commit a8295675 by Ruben Bridgewater

Update transaction lock docs

1 parent 8d9877ca
Showing with 18 additions and 1 deletions
......@@ -61,8 +61,25 @@ Transaction.ISOLATION_LEVELS = {
* lock: t1.LOCK.SHARE,
* lock: t1.LOCK.KEY_SHARE, // Postgres 9.3+ only
* lock: t1.LOCK.NO_KEY_UPDATE // Postgres 9.3+ only
* })
* });
* ```
*
* Postgres also supports specific locks while eager loading by using OF.
*
* ```js
* UserModel.findAll({
* where: ...,
* include: [TaskModel, ...]
* }, {
* transaction: t1,
* lock: {
* level: t1.LOCK...,
* of: UserModel
* }
* });
* ```
* UserModel will be locked but TaskModel won't!
*
* @property LOCK
*/
Transaction.LOCK = Transaction.prototype.LOCK = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!