Open
Description
Implement UpdateItem
operation to update specified fields on a DynamoDB record.
This operation should accept a variadic options argument for customizing behavior (example:s WithConditionalUpdate, WithOptimisticLock)
Key requirements
- Allow updating keys with provided values (automatic update expression compute)
- Support write conditions https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionalOperator
- Support for optimistic lock via version attribute
- Support field update expressions (example: update field based on existing value
add balance 100
)
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html
type UpdateOption func(*dynamodb.UpdateItemInput) error
func UpdateItem(ctx context.Context, pk, sk Atrribute, fields interface{}, opt ...UpdateOption)
Changes to TransactWriteItems
TransactWriteItems should support UpdateItem input.
Implement WithUpdateItem
option for TransactWriteItems.
https://github.com/oolio-group/dynago/blob/main/transaction_items.go
func (t *Client) WithUpdateItem(pk string, sk string, fields interface{}) types.TransactUpdateItem {
}
Metadata
Metadata
Assignees
Labels
No labels