Amazon DynamoDB

Delete

6 samples, from the least code that works to complete workflows.

What a delete does

Rule On DynamoDB
Which item By its full key: the id (an entity whose key is its id), the id with the key's other attributes, or ArxMatch.Columns/ArxMatch.Key naming the key's attributes
Other columns When they give a partition key, of the table or an index: one query finds the items (at most 100), then they are deleted by their keys, all or nothing, each conditioned on still matching; none found is 0 (ARX2002 with RequireSingleRow), several with RequireSingleRow ARX2003
No partition ARX8001: a write never scans
Nothing found DeleteAsync(name, id) returns false; DeleteAsync(entity) returns 0: deleting twice isn't an error
In a transaction The items are read now (so the count is known), and deleted with the transaction's other writes at the commit
Names Placeholders only; expression or SQL syntax in a match name is ARX1017, checked before the match itself
Rows by a condition Delete finds rows by equal values: the id, a declared key, or columns you give values for (ArxMatch.Columns). To delete every row that meets a condition (amount > 100), call DeleteMultipleAsync(table, filter) (the filter must give a partition key; at most 100 items): one call, all or nothing, from 0.1.0-preview.5 (DeleteMultiple, Basics). Before that version: read the rows with RetrieveMultipleAsync and pass them to DeleteMultipleAsync.

The samples