-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support for Query IncludeAll #4838
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4838 +/- ##
==========================================
+ Coverage 92.74% 92.77% +0.02%
==========================================
Files 119 119
Lines 8731 8751 +20
==========================================
+ Hits 8098 8119 +21
+ Misses 633 632 -1
Continue to review full report at Codecov.
|
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.
Nice.
spec/ParseQuery.spec.js
Outdated
@@ -3684,6 +3684,75 @@ describe('Parse.Query testing', () => { | |||
}); | |||
}); | |||
|
|||
it("includeAll", (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.
note to self: add rule on " '. Surprised the default airbnb we use doesn't have an opinion....
src/RestQuery.js
Outdated
@@ -552,6 +558,29 @@ RestQuery.prototype.runCount = function() { | |||
}); | |||
}; | |||
|
|||
RestQuery.prototype.handleIncludeAll = function() { |
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.
function block comment would be nice....
src/RestQuery.js
Outdated
} | ||
// Add fields to include, keys, remove dups | ||
this.include = [...new Set([...this.include, ...includeFields])]; | ||
if (this.keys) { |
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.
comment like:
// if this.keys
not set, then all keys already included
assuming I've got that right.
@acinader Added the changes |
Closes: #4644
Includes all pointers without having to use multiple
include()
.Let me know if there is a better way to implement it.