electrodb icon indicating copy to clipboard operation
electrodb copied to clipboard

[WIP] Multi-attribute index support

Open tywalch opened this issue 3 weeks ago • 2 comments

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")

tywalch avatar Dec 13 '25 18:12 tywalch

Deploy Preview for electrodb-dev canceled.

Name Link
Latest commit 7b5b5fe87c751e36d359a3a6bfc972582bd7f09d
Latest deploy log https://app.netlify.com/projects/electrodb-dev/deploys/693db2579bc7c00008c88013

netlify[bot] avatar Dec 13 '25 18:12 netlify[bot]

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

anatolzak avatar Dec 15 '25 05:12 anatolzak