Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying IndexName in queries #34

Open
Veikkosuhonen opened this issue Jun 7, 2024 · 1 comment
Open

Add support for specifying IndexName in queries #34

Veikkosuhonen opened this issue Jun 7, 2024 · 1 comment

Comments

@Veikkosuhonen
Copy link

Example:

const cmd = tsynamoClient
      .query("myTable")
      .keyCondition("userId", "=", "123")
      .index("myIndex")
      .compile();

compiles to QueryCommand with "IndexName": "myIndex"

The problem is, need to figure out how to täsä when using a secondary index. Tsynamo would need to know the secondary index partition and sort keys probably. Since only some attributes are projected from the main table to the index, tsynamo needs to know what attributes are available in the index.

Another unknown is if there is a need to differentiate GSI and LSI

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html

Or just yolo and #32 😄

@woltsu
Copy link
Owner

woltsu commented Jun 12, 2024

Thanks for the issue! I will look into the index documentation.

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

No branches or pull requests

2 participants