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
Query improvements #798
Query improvements #798
Conversation
Pull Request Test Coverage Report for Build 7604f9714abc921da7729080811d258d45a0658b-PR-798
💛 - Coveralls |
The comparison operators allowed on the rangeKey can be found here: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.KeyConditionExpressions
|
I tested the PR. A simple query
All other operations seem to work correctly now. |
@MickL Can I see your Schema for this? |
This works with
This makes a query with
|
Hey @fishcharlie could you make any progress on this yet? :) |
@MickL Sadly I have not 😞. I have been super slammed with some personal stuff. This is still on my radar and I'm hoping to look into this more by the end of the weekend at the latest. No guarantees tho. |
…into queryImprovements
@MickL Could you please retest this and let me know if I'm missing anything? Also I'd love a PR review here if possible. You have been reading a lot about Query recently and I forget some of the ins and outs. If you don't feel comfortable with doing a full PR review, I'd really appreciate if you could at least review the tests I created. https://github.com/dynamoosejs/dynamoose/pull/798/files#diff-068619de362833d601fa169c3a9d30cb In the event you try to filter using I just want to make sure this covers all the use cases you brought up. Thanks!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
@hardyscc How detailed did you review? Maybe you can remove the Draft from the PR? |
res[item.KeyType.toLowerCase()] = item.AttributeName; | ||
return res; | ||
}, {}); | ||
return (comparisonChart[hash] || {}).type === "EQ" && (!range || !comparisonChart[range] || comparisonChart[range].type === "EQ"); | ||
// TODO: we need to write logic here to prioritize indexes with a range key that is being queried. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still up to date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MickL Yes it is. Gonna maybe do that in a separate PR. That issue is slightly lower priority compared to the rest of this PR. So I want to get this PR through first then I can come back to that in a cleanup PR.
@MickL if the test case cover most of the scenarios, then no need to dig into the actual sources ;) |
Closes #796