File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,10 @@ through the following steps:
109
109
110
110
1. Create a session from the client by using the ``startSession()`` method.
111
111
#. Use the ``withTransaction()`` method to start a transaction.
112
- #. Insert multiple documents. The ``withTransaction()`` method runs the
113
- insert operation and commits the transaction. If any operation results in
114
- errors, ``withTransaction()`` cancels the transaction.
112
+ #. Insert multiple documents into the ``restaurants`` collection. The
113
+ ``withTransaction()`` method runs the insert operation and commits the
114
+ transaction. If any operation results in errors, ``withTransaction()``
115
+ cancels the transaction.
115
116
#. Close the connection to the server by using the ``client.close()`` method.
116
117
117
118
.. literalinclude:: /includes/write/transaction.kt
@@ -121,6 +122,9 @@ through the following steps:
121
122
:copyable:
122
123
:dedent:
123
124
125
+ If you require more control over your transactions, you can use the ``startTransaction()``
126
+ method. You can use this method with the ``commitTransaction()`` and ``abortTransaction()``
127
+ methods described in the preceding section to manually manage the transaction lifecycle.
124
128
125
129
Additional Information
126
130
----------------------
You can’t perform that action at this time.
0 commit comments