Skip to content

Allow generic return types for ParseCloud, hint, and explain #92

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 15 commits into from
Mar 15, 2021

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Mar 14, 2021

Removes the return type of AnyCodable and allows the developer to specify the return type for ParseCloud, query hint and explain. This allows for leveraging the JSONDecoder instead of having to cast.

These are breaking changes

  • Allow generic return types
  • Fix testcases
  • Fix playground examples
  • Fix documentation
  • Changed functionality of synchronous query.first(). It use to return nil if no values are found. Now it will throw an error if none are found. The asynchronous version already does this, this changes makes them behave the same.
  • Prepare for 1.2.0 release

@codecov
Copy link

codecov bot commented Mar 14, 2021

Codecov Report

Merging #92 (5a68dd9) into main (0b0d775) will decrease coverage by 0.14%.
The diff coverage is 72.60%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   79.08%   78.94%   -0.15%     
==========================================
  Files          63       63              
  Lines        5115     5114       -1     
==========================================
- Hits         4045     4037       -8     
- Misses       1070     1077       +7     
Impacted Files Coverage Δ
Sources/ParseSwift/API/Responses.swift 67.39% <ø> (ø)
Sources/ParseSwift/Objects/ParseInstallation.swift 82.60% <0.00%> (-0.18%) ⬇️
Sources/ParseSwift/Objects/ParseUser.swift 76.45% <0.00%> (-0.30%) ⬇️
Sources/ParseSwift/Protocols/Queryable.swift 0.00% <ø> (ø)
Sources/ParseSwift/Objects/ParseObject.swift 77.17% <16.66%> (-0.76%) ⬇️
Sources/ParseSwift/Types/Query.swift 90.63% <85.71%> (-0.08%) ⬇️
Sources/ParseSwift/API/URLSession+extensions.swift 80.21% <87.50%> (+1.64%) ⬆️
Sources/ParseSwift/API/API+Commands.swift 82.72% <100.00%> (ø)
Sources/ParseSwift/Coding/ParseCoding.swift 89.13% <100.00%> (+2.17%) ⬆️
...ources/ParseSwift/Storage/ParseKeyValueStore.swift 88.00% <100.00%> (ø)
... and 7 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 0b0d775...5a68dd9. Read the comment docs.

@cbaker6 cbaker6 requested a review from TomWFox March 14, 2021 04:18
@cbaker6 cbaker6 closed this Mar 14, 2021
@cbaker6 cbaker6 reopened this Mar 14, 2021
@cbaker6 cbaker6 merged commit 82cbecd into main Mar 15, 2021
@cbaker6 cbaker6 deleted the returnTypes branch March 15, 2021 01:23
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