8000 Implement UpdateItem operation and support for TransactWriteItems · Issue #21 · oolio-group/dynago · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement UpdateItem operation and support for TransactWriteItems #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
shidil opened this issue May 7, 2025 · 0 comments · May be fixed by #23
Open

Implement UpdateItem operation and support for TransactWriteItems #21

shidil opened this issue May 7, 2025 · 0 comments · May be fixed by #23

Comments

@shidil
Copy link
Member
shidil commented May 7, 2025

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

  1. Allow updating keys with provided values (automatic update expression compute)
  2. Support write conditions https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html#DDB-UpdateItem-request-ConditionalOperator
  3. Support for optimistic lock via version attribute
  4. 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 {
}
devin-ai-integration bot added a commit that referenced this issue May 7, 2025
 #21)

Co-Authored-By: shidil.e@oolio.com <shidil@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0