feat: Support for nested values in SpecialKey #96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This pull request introduces the capability to use
SpecialKey
for specifying values in nested structures within sessions, enhancing the flexibility of our session management. The primary motivation for this change is to support complex querying scenarios, such as cross-querying session data by user IDs, which are stored in nested objects within session structures.Key Changes:
Nested Structure Support: Previously, accessing nested attributes like userId within a user object in the session data was not possible with SpecialKey. This update enables this functionality, allowing SpecialKey to target nested attributes.
Compatibility and Testing:
Use Case:
Consider a session structured as follows:
set special keys.
dynamodb-client query output
With the current system, it is impossible to set
userId
as aSpecialKey
for purposes like querying in DynamoDB's Global Secondary Indexes (GSI) for cross-session user data retrieval. This update addresses such limitations by allowing userId to be specified as aSpecialKey
.Impact:
This enhancement will significantly improve our ability to perform more complex queries on session data, facilitating better data management and retrieval based on user-specific or other nested session attributes.