Parse-Swift
Parse-Swift copied to clipboard
Simplify updating object
trafficstars
New Feature / Enhancement Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
Current Limitation
While https://github.com/parse-community/Parse-Swift/issues/401 with its PR https://github.com/parse-community/Parse-Swift/pull/406 was a great simplification when updating an object, it still requires special consideration when updating an object.
Specifically:
- A developer still has to keep in mind that there is a special approach with
obj.key.set(\.key, to: "value2")(see example) needed to only send updated keys to the server, and they cannot simply useobj.key = "value2". - The special method
obj.key.set(\.key, to: "value2")contains a duplication of parameters; it requires a reference tokeytwo times.
Feature / Enhancement Description
Further simplify to allow to use obj.key = "value2" without calling any special method.
Example Use Case
Alternatives / Workarounds
Status quo
References
- Discussion about possible approach: https://github.com/parse-community/Parse-Swift/pull/263
Thanks for opening this issue!
- 🎉 We are excited about your ideas for improvement!