Skip to content

Commit 073c271

Browse files
committed
DOCSP-51036: Transactions
1 parent 5796c04 commit 073c271

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

source/interact-data.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Interact with Data
2424
CRUD Operations </interact-data/crud>
2525
Specify a Query </interact-data/specify-a-query>
2626
Perform Raw Queries </interact-data/raw-queries>
27+
Transactions </interact-data/transactions>
2728

2829
In this section, you can learn how to use {+django-odm+} to interact with your
2930
MongoDB data.
@@ -36,3 +37,6 @@ MongoDB data.
3637

3738
- :ref:`django-raw-queries`: Learn how to use MongoDB's aggregation pipeline syntax
3839
or the PyMongo driver to query your data.
40+
41+
- :ref:`django-transactions`: Learn how to use {+framework+}'s transactions API
42+
to run data operations within a transaction.

source/interact-data/transactions.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. _django-transactions:
2+
3+
=========================
4+
Transactions and Sessions
5+
=========================
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: code example, ACID compliance, multi-document
13+
14+
.. contents:: On this page
15+
:local:
16+
:backlinks: none
17+
:depth: 2
18+
:class: singlecol
19+
20+
Overview
21+
--------
22+
23+
In this guide, you can learn how to use the {+django-odm+} to perform
24+
**transactions**. Transactions allow you to perform a series of operations
25+
that change data only if the entire transaction is committed.
26+
If any operation in the transaction does not succeed, the library stops the
27+
transaction and discards all data changes before they ever become
28+
visible. This feature is called **atomicity**.

0 commit comments

Comments
 (0)