@@ -50,13 +50,14 @@ public protocol ParseObject: Objectable,
50
50
CustomDebugStringConvertible ,
51
51
CustomStringConvertible {
52
52
/**
53
- The weight/rank of a `QueryConstraint.matchesText()`.
53
+ The weight/rank of a `QueryConstraint.matchesText()`.
54
54
*/
55
55
var score : Double ? { get }
56
56
57
57
/**
58
- This `ParseObject` before `ParseObject.mutable` was called.
59
- - warning: This property should not be set or modified by the developer.
58
+ A JSON encoded version of this `ParseObject` before `mutable` was called and
59
+ properties were changed.
60
+ - warning: This property is not intended to be set or modified by the developer.
60
61
*/
61
62
var originalData : Data ? { get set }
62
63
@@ -65,7 +66,8 @@ public protocol ParseObject: Objectable,
65
66
a subset of the fields (PATCH) of an object as oppose to replacing an object (PUT).
66
67
- note: It is recommended to use this to create a mutable copy of your `ParseObject`.
67
68
- warning: `mutable` should only be used on `ParseObject`'s that have already
68
- been saved at least once to a Parse Server and have a valid `objectId`.
69
+ been saved at least once to a Parse Server and have a valid `objectId`. In addition,
70
+ the developer should have implemented added all of their properties to `merge`.
69
71
*/
70
72
var mutable : Self { get }
71
73
@@ -79,19 +81,21 @@ public protocol ParseObject: Objectable,
79
81
original: Self ) -> Bool where W: Equatable
80
82
81
83
/**
82
- Merges two `ParseObject`'s resulting in modified and unchanged Parse keys.
84
+ Merges two `ParseObject`'s with the resulting object consisting of all modified
85
+ and unchanged Parse properties.
83
86
- parameter object: The original installation.
84
87
- returns: The updated installation.
85
88
- throws: An error of type `ParseError`.
86
- - note: Use this in combination with `ParseMutable ` to only send updated
87
- keys to the server and then merge those changes with the original object.
89
+ - note: This is used in combination with `merge ` to only send updated
90
+ properties to the server and then merge those changes with the original object.
88
91
- warning: You should only call this method and shouldn't implement it directly
89
92
as it's already implemented for developers to use.
90
93
*/
91
94
func mergeParse( _ object: Self ) throws -> Self
92
95
93
96
/**
94
- Merges two `ParseObject`'s resulting in modified and unchanged keys.
97
+ Merges two `ParseObject`'s with the resulting object consisting of all modified
98
+ and unchanged properties.
95
99
96
100
//: Create your own value typed `ParseObject`.
97
101
struct GameScore: ParseObject {
@@ -120,11 +124,11 @@ public protocol ParseObject: Objectable,
120
124
- returns: The merged object.
121
125
- throws: An error of type `ParseError`.
122
126
- note: Use this in combination with `ParseMutable` to only send updated
123
- keys to the server and then merge those changes with the original object.
127
+ properties to the server and then merge those changes with the original object.
124
128
- important: It is recommend you provide an implementation of this method
125
- for all of your `ParseObject`'s as the developer has access to all keys of a
129
+ for all of your `ParseObject`'s as the developer has access to all properties of a
126
130
`ParseObject`. You should always call `mergeParse`
127
- in the beginning of your implementation to handle all default Parse keys . In addition,
131
+ in the beginning of your implementation to handle all default Parse properties . In addition,
128
132
use `shouldRestoreKey` to compare key modifications between objects.
129
133
*/
130
134
func merge( _ object: Self ) throws -> Self
0 commit comments