[WIP] Multi-attribute index support
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")
Deploy Preview for electrodb-dev canceled.
| Name | Link |
|---|---|
| Latest commit | 7b5b5fe87c751e36d359a3a6bfc972582bd7f09d |
| Latest deploy log | https://app.netlify.com/projects/electrodb-dev/deploys/693db2579bc7c00008c88013 |
@tywalch just wanted to mention that the "condition" option should not be available for multi-attribute indexes