O'Reilly logo

Learning Azure DocumentDB by Riccardo Becker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using transactions

Transactions inside DocumentDB are applicable only in server-side code. This means that building a transactional system can be achieved, for example, by writing stored procedures. Since stored procedures exist on a collection level, transactions can only span one collection, and adding or modifying documents across collections is not supported at the time of writing.

DocumentDB handles all logic that is running inside a stored procedure or trigger a transaction explicitly. There is no need to start and commit a transaction whatsoever. This is explicitly managed by the execution engine of DocumentDB. If an exception is raised inside the stored procedure or trigger, the entire transaction is aborted accordingly. This prevents inconsistent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required