Skip to content

fix: use select for ParseLiveQuery when fields are not present #377

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 4 commits into from
Jul 2, 2022
Merged

fix: use select for ParseLiveQuery when fields are not present #377

merged 4 commits into from
Jul 2, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jul 2, 2022

New Pull Request Checklist

Issue Description

When using ParseLiveQuery, developers current have to call the fields method on query even though they may have already called select. This requires the developer to have to take an additional step when using Live Query.

Related issue: #n/a

Approach

When using the Query for ParseLiveQuery, setting fields will take precedence over select. If fields are not set, the select keys will be used.

TODOs before merging

  • Add tests
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jul 2, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #377 (c572d31) into main (4ccb8a6) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #377      +/-   ##
==========================================
+ Coverage   89.50%   89.54%   +0.03%     
==========================================
  Files         152      152              
  Lines       13965    13969       +4     
==========================================
+ Hits        12499    12508       +9     
+ Misses       1466     1461       -5     
Impacted Files Coverage Δ
Sources/ParseSwift/Types/Query.swift 95.14% <ø> (ø)
Sources/ParseSwift/LiveQuery/Messages.swift 100.00% <100.00%> (ø)
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 76.16% <100.00%> (+0.06%) ⬆️
Sources/ParseSwift/Objects/ParseObject.swift 84.95% <0.00%> (-0.16%) ⬇️
Sources/ParseSwift/Objects/ParseUser.swift 86.29% <0.00%> (+0.17%) ⬆️
Sources/ParseSwift/Coding/ParseEncoder.swift 78.23% <0.00%> (+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 4ccb8a6...c572d31. Read the comment docs.

@cbaker6 cbaker6 merged commit b0bdf71 into parse-community:main Jul 2, 2022
@cbaker6 cbaker6 deleted the selectFields branch July 2, 2022 18:36
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.

1 participant