Skip to content

Conversation

@ianbotsf
Copy link
Contributor

Issue #

Resolves #1577

Description of changes

Adds support for getItem(partitionKey: PK) and getItem(partitionKey: PK, sortKey: SK) in DynamoDB Mapper tables by way of a new private interceptor that sets the low-level key before invocation.

This change also updates the Operation type to a data class to provide an easy copy method which can insert the new interceptor into an operation created by one of the codegen factory methods. The Operation type is internal so there's no concern about public API compatibility.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ianbotsf ianbotsf requested a review from a team as a code owner April 22, 2025 22:42
@sonarqubecloud
Copy link

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

@github-actions
Copy link

Affected Artifacts

No artifacts changed size

lowLevelInvoke,
deserialize,
interceptors.map {
// Will cause runtime ClassCastExceptions during interceptor invocation if the types don't match. Is that ok?
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: The comment is useful but Is that ok? seems like it could be removed

@ianbotsf ianbotsf merged commit dba98bd into main Apr 24, 2025
20 checks passed
@ianbotsf ianbotsf deleted the feat-getitem-overloads branch April 24, 2025 16:02
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.

DynamoDbMapper getItem not working by providing key as String

3 participants