Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mindler-olli committed May 31, 2024
1 parent b65d609 commit 5d48a28
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 5d48a28

Please sign in to comment.