transactWriteItems can use ReturnValues to get written items on successful write #5629
Open
1 of 2 tasks
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Right now, if you have a successful transact write items request, you need to read that value back to get its new state.
Other write operations, like
PutItemEnhancedRequest
andUpdateItemEnhancedRequest
, allow you specifyReturnValues
as an option to get these values back as part of the response for no additional read capacity.Use Case
When we utilize
@DynamoDbVersionAttribute
, version numbers for optimistic locking are automatically updated as part of the client call.We can manually update these ourselves client side to have the updated version, or re-read the object from the DB, but I'd rather the updated object could be included as part of the response.
Proposed Solution
The
ReturnValues
feature should also exist on the respectiveTransactPutItemEnhancedRequest
andTransactUpdateItemEnhancedRequest
requests, and any updated items should be included in the response if these values are set.Other Information
No response
Acknowledgements
AWS Java SDK version used
2.27.24
JDK version used
openjdk 17.0.9 2023-10-17 LTS
Operating System and version
macOS Sonoma 14.5
The text was updated successfully, but these errors were encountered: