From 5d48a28a96243151d86a021c6cac1a3268cbe6b7 Mon Sep 17 00:00:00 2001 From: Olli Warro Date: Fri, 31 May 2024 14:01:43 +0300 Subject: [PATCH] update readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 7359e5e..25cad01 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,8 @@ One can also utilise [DynamoDB Transaction](https://docs.aws.amazon.com/amazondy #### Write transaction +DynamoDB enables you to do multiple `Put`, `Update` and `Delete` in a single `WriteTransaction` command. One can also provide an optional `ClientRequestToken` to the transaction to ensure idempotency. + ```ts const trx = tsynamoClient.createWriteTransaction(); @@ -319,6 +321,9 @@ await trx.execute(); > [!IMPORTANT] > When passing the items into the transaction using the tsynamoClient, do not execute the individual calls! Instead just pass in the query builder as the item. +> [!WARNING] +> DynamoDB also supports doing `ConditionCheck` operations in the transaction, but Tsynamo does not yet support those. + #### Read transaction Since the read transaction output can affect multiple tables, the resulting output is an array of tuples where the first item is the name of the table and the second item is the item itself (or `undefined` if the item was not found). This can be used as a discriminated union to determine the resulting item's type.