Skip to content

Conversation

@tywalch
Copy link
Owner

@tywalch tywalch commented Dec 13, 2025

Context

AWS has added support for multi-attribute indexes in DynamoDB. Support for this new functionality would be immensely helpful for users and is likely possible without breaking changes.

Approach

In this PR, I will be chipping away at support for this feature. My priority is to just-get-things-working™ with tests. Ideally, this uncovers edge cases and tough judgment calls.

Only once things are working and behavior is locked down, I'll revisit ways to improve code organization, error handling, documentation, etc.

Questions

[ ] Should collection support for "composite" attributes ultimately just be that they enable processing multiple entity types
[ ] Should we still try to achieve index-level entity/service isolation with "composite" indexes or should we just use filters?
[ ] Should we add a "meta" object as the third argument to get and set that includes the entity, version, and service values from the schema? This might help the user build their own isolation fields.

Decisions

Learnings

  • It will be good practice to genericize index attributes using field (e.g., field: "attr1")

# Context AWS has added support for multi-attribute indexes in DynamoDB. Support for this new functionality would be immensely helpful for users and is likely possible without breaking changes.
@netlify
Copy link

netlify bot commented Dec 13, 2025

Deploy Preview for electrodb-dev canceled.

Name Link
🔨 Latest commit 94ef7d3
🔍 Latest deploy log https://app.netlify.com/projects/electrodb-dev/deploys/6952cc10bd2b7100087976e8

@tywalch tywalch linked an issue Dec 13, 2025 that may be closed by this pull request
@anatolzak
Copy link
Contributor

@tywalch just wanted to mention that the "condition" option should not be available for multi-attribute indexes

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.

DynamoDb Multi-Attribute Keys

3 participants