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

Support for Query IncludeAll #4838

Merged
merged 2 commits into from
Jun 16, 2018

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jun 14, 2018

Closes: #4644

Includes all pointers without having to use multiple include().

Let me know if there is a better way to implement it.

@codecov
Copy link

codecov bot commented Jun 14, 2018

Codecov Report

Merging #4838 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/Routers/ClassesRouter.js 92.95% <100%> (+0.2%) ⬆️
src/RestQuery.js 95.96% <100%> (+0.45%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ef437a...9ae0947. Read the comment docs.

@dplewis dplewis requested review from flovilmart and acinader June 14, 2018 17:12
acinader
acinader previously approved these changes Jun 15, 2018
Copy link
Contributor

@acinader acinader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@@ -3684,6 +3684,75 @@ describe('Parse.Query testing', () => {
});
});

it("includeAll", (done) => {
Copy link
Contributor

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() {
Copy link
Contributor

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) {
Copy link
Contributor

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.

@dplewis
Copy link
Member Author

dplewis commented Jun 16, 2018

@acinader Added the changes

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

Successfully merging this pull request may close these issues.

2 participants