Skip to content

Parse.Query.fromJSON method #448

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

Merged
merged 2 commits into from
Jun 26, 2017
Merged

Conversation

kyptov
Copy link
Contributor

@kyptov kyptov commented Jun 25, 2017

Made mistake with previous PR. This is new one.
Method restores query from json gained from Parse.Query.toJSON()

@codecov
Copy link

codecov bot commented Jun 25, 2017

Codecov Report

Merging #448 into master will increase coverage by 0.05%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
+ Coverage   85.34%   85.39%   +0.05%     
==========================================
  Files          46       46              
  Lines        3704     3724      +20     
  Branches      846      854       +8     
==========================================
+ Hits         3161     3180      +19     
- Misses        543      544       +1
Impacted Files Coverage Δ
src/ParseQuery.js 94.57% <95%> (+0.02%) ⬆️

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 1b26adc...85c38fe. Read the comment docs.

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.

Thanks for the PR! While it’s working as expected, I have my doubts on the naming of fromJSON. It sound like a static method on Parse.Query, and not an instance method.

Could we make it so const query = Parse.Query.fromJSON(className, json)

And

`let query = new Parse.Query(className);
query.withJSON(json)```

@kyptov
Copy link
Contributor Author

kyptov commented Jun 26, 2017

@flovilmart no problem, do you mean this?

  • rename fromJSON -> withJSON,
  • add new static method fromJSON which creates new Parse.Query and calling withJSON method
  • some test to cover this

@flovilmart
Copy link
Contributor

@kyptov, yes that’s what I had in mind. Does that makes sense for you?

Parse.Query.withJSON method
@kyptov
Copy link
Contributor Author

kyptov commented Jun 26, 2017

@flovilmart made some changes

@flovilmart
Copy link
Contributor

@kyptov looking great! Thanks!

@flovilmart flovilmart merged commit b3a6a0c into parse-community:master Jun 26, 2017
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