-
-
Notifications
You must be signed in to change notification settings - Fork 598
Add support to add hint to Parse.Query #1054
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
Conversation
updated master
Codecov Report
@@ Coverage Diff @@
## master #1054 +/- ##
=========================================
- Coverage 92.21% 92.2% -0.02%
=========================================
Files 54 54
Lines 5162 5167 +5
Branches 1148 1157 +9
=========================================
+ Hits 4760 4764 +4
- Misses 402 403 +1
Continue to review full report at Codecov.
|
I can go back and add more test but I want to make sure this is what we're looking for? |
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.
I left a few comments. You can add unit tests for now.
Once parse-community/parse-server#6322 is merged then we can add integration tests.
src/ParseQuery.js
Outdated
@@ -713,7 +722,8 @@ class ParseQuery { | |||
const controller = CoreManager.getQueryController(); | |||
const params = { | |||
distinct: key, | |||
where: this._where | |||
where: this._where, | |||
hint: this._hint ? this._hint : undefined, |
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.
just hint: this.hint
is fine
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.
The reason I did this was because I caused tests to fail because in the constructor this._hint is set to null (like readPreference)... so I can either take setting this._hint as null out of the constructor or keep it like this?
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.
You will know once you start writing tests.
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.
done!
src/ParseQuery.js
Outdated
|
||
const params = { | ||
pipeline, | ||
hint: this._hint ? this._hint : undefined, |
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.
Same as above,
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.
done!
@stevestencil Can you give me access to your branch? |
@dplewis Done! |
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.
awesome. exposing explain super awesome.
Add support to add hint to Parse.Query (parse-community#1054)
Thoughts on documenting this in the guide? |
parse-community/parse-server/issues/6288