Skip to content

Commit d180c63

Browse files
committed
doc updates
1 parent 034b652 commit d180c63

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

Sources/ParseSwift/Objects/ParseObject.swift

+15-11
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ public protocol ParseObject: Objectable,
5050
CustomDebugStringConvertible,
5151
CustomStringConvertible {
5252
/**
53-
The weight/rank of a `QueryConstraint.matchesText()`.
53+
The weight/rank of a `QueryConstraint.matchesText()`.
5454
*/
5555
var score: Double? { get }
5656

5757
/**
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.
6061
*/
6162
var originalData: Data? { get set }
6263

@@ -65,7 +66,8 @@ public protocol ParseObject: Objectable,
6566
a subset of the fields (PATCH) of an object as oppose to replacing an object (PUT).
6667
- note: It is recommended to use this to create a mutable copy of your `ParseObject`.
6768
- 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`.
6971
*/
7072
var mutable: Self { get }
7173

@@ -79,19 +81,21 @@ public protocol ParseObject: Objectable,
7981
original: Self) -> Bool where W: Equatable
8082

8183
/**
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.
8386
- parameter object: The original installation.
8487
- returns: The updated installation.
8588
- 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.
8891
- warning: You should only call this method and shouldn't implement it directly
8992
as it's already implemented for developers to use.
9093
*/
9194
func mergeParse(_ object: Self) throws -> Self
9295

9396
/**
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.
9599

96100
//: Create your own value typed `ParseObject`.
97101
struct GameScore: ParseObject {
@@ -120,11 +124,11 @@ public protocol ParseObject: Objectable,
120124
- returns: The merged object.
121125
- throws: An error of type `ParseError`.
122126
- 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.
124128
- 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
126130
`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,
128132
use `shouldRestoreKey` to compare key modifications between objects.
129133
*/
130134
func merge(_ object: Self) throws -> Self

0 commit comments

Comments
 (0)