@@ -47,25 +47,44 @@ ACID transactions </basics/acid-transactions>`.
47
47
Operations </core/transactions/#transactions-and-operations>` section in
48
48
the Server manual.
49
49
50
- In MongoDB, multi-document transactions run within a **client session**.
51
- A client session is a grouping of related read or write operations that
52
- you want to execute sequentially. We recommend you reuse
53
- your client for multiple sessions and transactions instead of
54
- instantiating a new client each time.
55
-
56
- When combined with ``majority`` read and
57
- write concerns, the driver guarantees causal consistency between the
58
- operations. To learn more, see :manual:`Client Sessions and Causal Consistency Guarantees
59
- </core/read-isolation-consistency-recency/#client-sessions-and-causal-consistency-guarantees>` in the
60
- Server manual.
61
-
62
50
Learn more about how to use the driver to perform multi-document
63
51
transactions in the following sections of this guide:
64
52
65
53
- :ref:`Transaction APIs <nodejs-transaction-apis>`
66
54
- :ref:`Transaction Options <nodejs-transaction-settings>`
67
55
- :ref:`Transaction Errors <nodejs-transaction-errors>`
68
56
57
+ .. _nodejs-causal-consistency:
58
+
59
+ Causal Consistency
60
+ ~~~~~~~~~~~~~~~~~~
61
+
62
+ .. sharedinclude:: dbx/causal-consistency.rst
63
+
64
+ .. replacement:: insert-one-method
65
+
66
+ ``insertOne()``
67
+
68
+ .. replacement:: update-one-method
69
+
70
+ ``updateOne()``
71
+
72
+ .. replacement:: find-one-method
73
+
74
+ ``findOne()``
75
+
76
+ .. replacement:: delete-one-method
77
+
78
+ ``deleteOne()``
79
+
80
+ .. replacement:: majority-rc
81
+
82
+ ``majority``
83
+
84
+ .. replacement:: majority-wc
85
+
86
+ ``majority``
87
+
69
88
.. _nodejs-transaction-apis:
70
89
71
90
Transaction APIs
0 commit comments