Skip to content

Commit

Permalink
Fix explicit transaction examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano-ottolenghi committed Dec 21, 2023
1 parent 7a1ee1c commit ad6d8c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions javascript-manual/modules/ROOT/pages/transactions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ let transaction = await session.beginTransaction()
// await transaction.run('<QUERY 2>')
// ...
await transaction.close()
await transaction.commit()
await session.close()
----

Expand Down Expand Up @@ -239,7 +239,6 @@ async function transferToOtherBank(driver, customerId, otherBankId, amount) {
// Now the money has been transferred => can't rollback anymore
// (cannot rollback external services interactions)
} finally {
await tx.close() // rolls back if not yet committed
await session.close()
}
}
Expand Down

0 comments on commit ad6d8c1

Please sign in to comment.