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

fix: improve equatable comparison of QueryConstraint #275

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Nov 4, 2021

New Pull Request Checklist

Issue Description

The current QueryConstraint comparison attempts to cast Encodable constraints to NSObject's to check if they are equal. This can produce unintended results.

Related issue: #n/a

Approach

Compare encoded strings instead to produce a more reliable comparison of QueryConstraint's.

TODOs before merging

  • Refactor files for code organization improvements
  • Add entry to changelog
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

Thanks for opening this pull request!

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

@codecov
Copy link

codecov bot commented Nov 4, 2021

Codecov Report

Merging #275 (6296bec) into main (af447a6) will increase coverage by 0.00%.
The diff coverage is 92.10%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #275   +/-   ##
=======================================
  Coverage   82.23%   82.23%           
=======================================
  Files         103      104    +1     
  Lines       10577    10574    -3     
=======================================
- Hits         8698     8696    -2     
+ Misses       1879     1878    -1     
Impacted Files Coverage Δ
Sources/ParseSwift/Extensions/Data.swift 100.00% <ø> (ø)
Sources/ParseSwift/Extensions/URLCache.swift 46.66% <ø> (ø)
...eSwift/InternalObjects/BaseParseInstallation.swift 36.36% <ø> (ø)
Sources/ParseSwift/Objects/ParseSession.swift 77.77% <ø> (+7.77%) ⬆️
...ources/ParseSwift/Types/ParseOperation+async.swift 100.00% <ø> (ø)
...rces/ParseSwift/Types/ParseOperation+combine.swift 100.00% <ø> (ø)
Sources/ParseSwift/Types/ParseRelation.swift 80.35% <ø> (ø)
Sources/ParseSwift/Types/Query.swift 93.60% <50.00%> (-0.02%) ⬇️
Sources/ParseSwift/Extensions/Encodable.swift 77.77% <77.77%> (ø)
Sources/ParseSwift/Coding/ParseCoding.swift 88.00% <100.00%> (+3.78%) ⬆️
... and 3 more

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 af447a6...6296bec. Read the comment docs.

@cbaker6 cbaker6 merged commit 37a2247 into main Nov 4, 2021
@cbaker6 cbaker6 deleted the queryConstraintCompare branch November 4, 2021 15:51
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.

None yet

1 participant