Skip to content

Conversation

@ianbotsf
Copy link
Contributor

Issue #

Related to #472

Description of changes

This change adds support for multi-attribute keys in DynamoDB Mapper. Specifically, the KeySpec class is now generic over KeyType, which represents key values consisting of 1-4 attributes. Corresponding changes are made in various schema modeling classes to compensate. Additionally, KeyFilter has been updated to accept a KeyType for partition keys and distinct SortKeyExpr values for up to 4 sort key attributes.

When reviewing these changes, I recommend the following order:

  • Mapper runtime:
    • KeyType and associated implementations/extensions — ADT for key values of 1-4 attributes
    • KeySpec and associated implementations/extensions — updated to be generic over KeyType instead of an unbound type K
    • ItemSchema — updated KeySpec usage
    • The model package — updated key usage in various modeling types (e.g., Table, PersistenceSpec, etc.)
    • KeyFilter and its implementation — updated to use KeyType for multi-attribute key queries
  • Schema codegen:
    • MapperTypes — various refactors to reference new/updated runtime declarations
    • SchemaRenderer — various updates to generate updated schemas
  • (...and then everything else...)

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 December 12, 2025 21:43
@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK

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.

1 participant