Skip to content

Commit 73eb3e1

Browse files
authored
DOCSP-27750 Interlinks Session methods (#2533) (#2600)
* DOCSP-27750 Interlinks Session methods (#2533) * DOCSP-27750 Interlinks Session methods * Adds Session.withTransaction to the toctree * Fixes rendering issue in Session.withTransaction * Test link fixes * Test link fixes * Test link fixes * Fixes per Anna Henningsen * Fixes per Anna Henningsen * Fixes build * Fixes build
1 parent cb3e944 commit 73eb3e1

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed

source/reference/command/abortTransaction.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ Definition
2323
without saving any of the changes made by the operations in the
2424
transaction.
2525

26+
.. |method| replace:: :method:`Session.abortTransaction`
27+
helper method
28+
.. include:: /includes/fact-dbcommand-tip.rst
29+
2630
To run the :dbcommand:`abortTransaction`, the command must be run
2731
against the ``admin`` database and run within a
28-
:method:`Session`. Rather than run the :dbcommand:`abortTransaction`
29-
command directly, most users should use the driver method or the
30-
:binary:`~bin.mongo` shell :method:`Session.abortTransaction()`
31-
helper.
32+
:method:`Session`.
3233

3334
The command has the following syntax:
3435

source/reference/command/commitTransaction.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ Definition
2020
Saves the changes made by the operations in the :doc:`multi-document
2121
transaction </core/transactions>` and ends the transaction.
2222

23+
.. |method| replace:: :method:`Session.commitTransaction`
24+
helper methods
25+
.. include:: /includes/fact-dbcommand-tip.rst
26+
2327
To run the :dbcommand:`commitTransaction`, the command must be run
2428
against the ``admin`` database and run within a
25-
:method:`Session`. Rather than run the :dbcommand:`commitTransaction`
26-
command directly, most users should use the driver method or the
27-
:binary:`~bin.mongo` shell :method:`Session.commitTransaction()`
28-
helper.
29+
:method:`Session`.
2930

3031
The command has the following syntax:
3132

source/reference/command/startSession.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Definition
2020
The :dbcommand:`startSession` command starts a new logical
2121
:ref:`session <sessions>` for a sequence of operations.
2222

23+
.. |method| replace:: :method:`Mongo.startSession`
24+
helper method
25+
.. include:: /includes/fact-dbcommand-tip.rst
26+
2327
:dbcommand:`startSession` has the following syntax:
2428

2529
.. code-block:: javascript

source/reference/method/Mongo.startSession.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ Definition
1919
:binary:`~bin.mongo` assigns the session ID to commands associated
2020
with the session.
2121

22+
.. |dbcommand| replace:: :dbcommand:`startSession` command
23+
.. include:: /includes/fact-mongo-shell-method-alt.rst
24+
2225
The :method:`~Mongo.startSession()` method can take a document with
2326
session options. The options available are:
2427

source/reference/method/Session.abortTransaction.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Definition
2121
without saving any of the changes made by the operations in the
2222
transaction.
2323

24+
.. |dbcommand| replace:: :dbcommand:`abortTransaction` command
25+
.. include:: /includes/fact-mongo-shell-method-alt.rst
26+
2427
.. include:: /includes/transaction-support.rst
2528

2629
Behavior

source/reference/method/Session.commitTransaction.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Definition
1818
Saves the changes made by the operations in the :doc:`multi-document
1919
transaction </core/transactions>` and ends the transaction.
2020

21+
.. |dbcommand| replace:: :dbcommand:`commitTransaction` command
22+
.. include:: /includes/fact-mongo-shell-method-alt.rst
23+
2124
.. include:: /includes/transaction-support.rst
2225

2326
Behavior

0 commit comments

Comments
 (0)