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 Distinct for special fields #5144

Merged
merged 2 commits into from
Oct 26, 2018

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Oct 26, 2018

No description provided.

flovilmart
flovilmart previously approved these changes Oct 26, 2018
Copy link
Contributor

@flovilmart flovilmart left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Oct 26, 2018

Codecov Report

Merging #5144 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5144      +/-   ##
==========================================
- Coverage   93.91%   93.84%   -0.07%     
==========================================
  Files         123      123              
  Lines        8941     8939       -2     
==========================================
- Hits         8397     8389       -8     
- Misses        544      550       +6
Impacted Files Coverage Δ
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 91.48% <100%> (-0.77%) ⬇️
src/RestWrite.js 92.88% <0%> (-0.55%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 97.08% <0%> (-0.09%) ⬇️
src/Adapters/Storage/Mongo/MongoTransform.js 88.24% <0%> (+0.14%) ⬆️

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 961abda...8e5e3dd. Read the comment docs.

@dplewis
Copy link
Member Author

dplewis commented Oct 26, 2018

@flovilmart I dismissed your review, can you approve and merge?

@dplewis dplewis merged commit daab378 into parse-community:master Oct 26, 2018
@dplewis dplewis deleted the distinct-required branch October 26, 2018 15:21
@LilMoke
Copy link

LilMoke commented Aug 21, 2019

dplewis, can I perform a distinct query from an iOS app? I did not see it in the doc and in the issues about distinct it looks like it may need to be done from a cloud function. Can you give me a bit more info please?

Best

@dplewis
Copy link
Member Author

dplewis commented Aug 21, 2019

Distinct requires Master Key so it can’t be used on the client side. Cloud code should be used in your case.

@LilMoke
Copy link

LilMoke commented Aug 21, 2019 via email

@dplewis
Copy link
Member Author

dplewis commented Aug 21, 2019

You can check the JavaScript guide.

const query = new Parse.Query("User");
query.distinct("age")
.then(function(results) {
// results contains unique age
})
.catch(function(error) {
// There was an error.
});

@LilMoke
Copy link

LilMoke commented Aug 21, 2019 via email

UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Support Distinct for special fields

* update changelog
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.

3 participants