From 01d3581174afc435f27c1a1c115fd1ff4d47b792 Mon Sep 17 00:00:00 2001 From: Avinder Bahra Date: Sun, 4 Aug 2024 07:27:42 +0100 Subject: [PATCH] minor --- docs/cheat-sheet.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cheat-sheet.md b/docs/cheat-sheet.md index b9de5c64..dde8517f 100644 --- a/docs/cheat-sheet.md +++ b/docs/cheat-sheet.md @@ -39,6 +39,6 @@ For more detailed working examples please see the High Level API integration tes | [BatchGetItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchGetItem.html) | `people <- DynamoDBQuery.forEach(listOfIds)(id => DynamoDBQuery.get[Person]("personTable")(Person.id.partitionKey === id)).execute`| | [BatchWriteItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html) | _ <- `DynamoDBQuery.forEach(people)(p => put("personTable", p)).execute` | | | | -| [TransactGetItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html) | `val getJohn = get("personTable")(Person.id.partitionKey === "1")`
`val getSmith = get("employeeTable")(Employee.id.partitionKey === "2")`
`tuple <- (getJohn zip getSmith).transaction.execute`
Note transactions can span different tables. Also see the transactions [page](transactions.md). | -| [TransactWriteItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html) | `val putJohn = put("personTable", Person(1, "John", 2020))`
`val putSmith = put("employeeTable", Person(2, "Smith", 2024))`
`_ <- (putJohn zip putSmith).transaction.execute`
Note transactions can span different tables. Also see the transactions [page](transactions.md). | +| [TransactGetItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html) | `val getJohn = get("personTable")(Person.id.partitionKey === "1")`
`val getSmith = get("employeeTable")(Employee.id.partitionKey === "2")`
`tuple <- (getJohn zip getSmith).transaction.execute`
Note transactions can span different tables. Also see the [transactions page](transactions.md). | +| [TransactWriteItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html) | `val putJohn = put("personTable", Person(1, "John", 2020))`
`val putSmith = put("employeeTable", Person(2, "Smith", 2024))`
`_ <- (putJohn zip putSmith).transaction.execute`
Note transactions can span different tables. Also see the [transactions page](transactions.md). |