Skip to content

Glossary: MongoDB

withTransaction

Also written: session.withTransaction()

A session method that starts a transaction, runs your async function and commits when it finishes. If the function throws, it undoes every write and rethrows.

Where the book teaches it

Related terms

SessionMulti-document transaction