diff --git a/docs/cheat-sheet.md b/docs/cheat-sheet.md index 6a92da08..ce1a73f2 100644 --- a/docs/cheat-sheet.md +++ b/docs/cheat-sheet.md @@ -18,7 +18,7 @@ For more detailed working examples please see the High Level API integration tes |-------------------------------| --- | | [GetItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html) | `person <- get("personTable")(Person.id.partitionKey === "1").execute` | | [UpdateItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html) | `_ <- update("personTable")(Person.id.partitionKey === "1")(Person.name.set("Foo")).execute` | -| [PutItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html) | _ <- `put("personTable", Person(42, "John", 2020)).execute` | +| [PutItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html) | _ <- `put("personTable", Person("42", "John", 2020)).execute` | | [DeleteItem](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html) | `_ <- deleteFrom("personTable")(Person.id.partitionKey === "1").execute` | | | | | [Projection Expressions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Attributes.html) | `Person.id`, `Person.name`, `Person.year` | @@ -40,5 +40,5 @@ For more detailed working examples please see the High Level API integration tes | [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("personTable")(Person.id.partitionKey === "2")`
`tuple <- (getJohn zip getSmith).transaction.execute` | -| [TransactWriteItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html) | `val putJohn = put("personTable", Person(1, "John", 2020))`
`val putSmith = put("personTable", Person(2, "Smith", 2024))`
`_ <- (putJohn zip putSmith).transaction.execute` | +| [TransactWriteItems](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactWriteItems.html) | `val putJohn = put("personTable", Person("1", "John", 2020))`
`val putSmith = put("personTable", Person("2", "Smith", 2024))`
`_ <- (putJohn zip putSmith).transaction.execute` |