Skip to content

Conversation

podlech
Copy link

@podlech podlech commented Jul 18, 2025

upsert and upsertAsync use UpdateItem behind the scenes which allow to create or update an item in DynamoDB.

Copy link
Collaborator

@kyeotic kyeotic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @podlech, thanks for putting this together, its always nice to see people take an action-first approach in OSS. I know partial-updates with UpdateItem are a gap in the tempest API, and they are something I would like to get to.

Unfortunately, this API breaks some key principles in tempest. First, it directly exposes the AWS API UpdateItemEnhancedRequest, which tightly couples tempest's update to AWS's update. Second it gives up the strong type-safety of the View API it extends, allowing items of any type to be updated on a view, and requiring interaction with the low-level codec API to interact with items even when they are a part of the view being used.

Tempest reason-for-being is to provide an idiomatic-kotlin API with strong type safety. An UpdateItem API would need to adhere to this principle.

@podlech podlech requested a review from kyeotic July 18, 2025 21:03
@podlech podlech force-pushed the jpodlech/Implement_upsert_and_upsertAsync branch 2 times, most recently from c17b0c0 to bb1b2b7 Compare July 18, 2025 21:06
Copy link

@Xin-Tong Xin-Tong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me in the scope of down stream services. Defer to kyeotic from tempest point of view.

@podlech podlech force-pushed the jpodlech/Implement_upsert_and_upsertAsync branch 4 times, most recently from 224d3b0 to bc5512a Compare July 18, 2025 21:59
upsert and upsertAsync use UpdateItem behind the scenes which allow to
create or update an item in DynamoDB.
@podlech podlech force-pushed the jpodlech/Implement_upsert_and_upsertAsync branch from bc5512a to 2a0c212 Compare July 18, 2025 22:01
@podlech
Copy link
Author

podlech commented Aug 4, 2025

We'll try saveWithResult and report back.

@podlech podlech closed this Aug 4, 2025
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 this pull request may close these issues.

3 participants