Skip to content

Commit

Permalink
update code intros
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmarie17 committed Aug 20, 2024
1 parent cf34824 commit ff52fb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source/fundamentals/transactions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,19 @@ to learn more about these methods.
Example
-------

This example uses the following {+language+} data class to model its documents:

.. literalinclude:: /examples/generated/TransactionsTest.snippet.data-class.kt
:language: kotlin

The following example demonstrates how you can create a session, create a transaction,
and commit a changes to existing documents:
and commit changes to existing documents:

1. Create a session from the client using the ``startSession()`` method.
#. Use the ``startTransaction()`` method to start a transaction.
#. Update the specified documents, then use the ``commitTransaction()`` method if all
operations succeed, or ``abortTransaction()`` if any operations fail.

This example uses the following {+language+} data classes to model its documents:

.. literalinclude:: /examples/generated/TransactionsTest.snippet.data-class.kt
:language: kotlin

.. literalinclude:: /examples/generated/TransactionsTest.snippet.transaction-function.kt
:language: kotlin

Expand Down

0 comments on commit ff52fb1

Please sign in to comment.