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

Commit aa6345be by Ajaz Ur Rehman Committed by papb

docs(transactions.md): add missing `async` declaration (#12838)

Co-authored-by: Pedro Augusto de Paula Barbosa <papb1996@gmail.com>
1 parent c3ec6c50
Showing with 1 additions and 1 deletions
...@@ -98,7 +98,7 @@ Note that `t.commit()` and `t.rollback()` were not called directly (which is cor ...@@ -98,7 +98,7 @@ Note that `t.commit()` and `t.rollback()` were not called directly (which is cor
When using the managed transaction you should *never* commit or rollback the transaction manually. If all queries are successful (in the sense of not throwing any error), but you still want to rollback the transaction, you should throw an error yourself: When using the managed transaction you should *never* commit or rollback the transaction manually. If all queries are successful (in the sense of not throwing any error), but you still want to rollback the transaction, you should throw an error yourself:
```js ```js
await sequelize.transaction(t => { await sequelize.transaction(async t => {
const user = await User.create({ const user = await User.create({
firstName: 'Abraham', firstName: 'Abraham',
lastName: 'Lincoln' lastName: 'Lincoln'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!