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

Commit 5d2663d7 by Mick Hansen

[ci skip] Transaction documentation errors

1 parent f8431ac4
Showing with 3 additions and 3 deletions
...@@ -6,7 +6,7 @@ The key difference is that the managed transaction uses a callback that expects ...@@ -6,7 +6,7 @@ The key difference is that the managed transaction uses a callback that expects
### Auto commit/rollback ### Auto commit/rollback
```js ```js
return sequelize.transaction(t) { return sequelize.transaction(function (t) {
return User.create({ return User.create({
firstName: 'Abraham', firstName: 'Abraham',
lastName: 'Lincoln' lastName: 'Lincoln'
...@@ -25,9 +25,9 @@ return sequelize.transaction(t) { ...@@ -25,9 +25,9 @@ return sequelize.transaction(t) {
}); });
``` ```
### Handled by user ### Handled manually
```js ```js
return sequelize.transaction().function (t) { return sequelize.transaction().then(function (t) {
return User.create({ return User.create({
firstName: 'Homer', firstName: 'Homer',
lastName: 'Simpson' lastName: 'Simpson'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!