Skip to content

Commit 9a3de84

Browse files
authored
feat: add includeAll computed property to Query (#362)
1 parent a82fd99 commit 9a3de84

File tree

13 files changed

+86
-66
lines changed

13 files changed

+86
-66
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.4.0...main)
66
* _Contributing to this repo? Add info about your change here to be included in the next release_
77

8+
__New features__
9+
- Add includeAll computed property to Query and deprecate includeAll() ([#361](https://github.com/parse-community/Parse-Swift/pull/361)), thanks to [Corey Baker](https://github.com/cbaker6).
10+
811
__Improvements__
912
- Allow LiveQuery client to be set using ParseLiveQuery.defaultClient and deprecate ParseLiveQuery.setDefault(). Show usage of deprecated code as warnings during compile time and suggest changes ([#360](https://github.com/parse-community/Parse-Swift/pull/360)), thanks to [Corey Baker](https://github.com/cbaker6).
1013

ParseSwift.playground/Pages/8 - Pointers.xcplaygroundpage/Contents.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ query2.first { results in
177177
objects.
178178
*/
179179
let query3 = Author.query("name" == "Bruce")
180-
.includeAll()
180+
.includeAll
181181

182182
query3.first { results in
183183
switch results {
@@ -192,7 +192,7 @@ query3.first { results in
192192
//: You can also check if a field is equal to a ParseObject.
193193
do {
194194
let query4 = try Author.query("book" == newBook)
195-
.includeAll()
195+
.includeAll
196196

197197
query4.first { results in
198198
switch results {

Sources/ParseSwift/Objects/ParseInstallation+async.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public extension ParseInstallation {
1616
Fetches the `ParseInstallation` *aynchronously* with the current data from the server
1717
and sets an error if one occurs.
1818
- parameter includeKeys: The name(s) of the key(s) to include that are
19-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
19+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
2020
`includeAll` for `Query`.
2121
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2222
- returns: Returns saved `ParseInstallation`.
@@ -128,7 +128,7 @@ public extension Sequence where Element: ParseInstallation {
128128
Fetches a collection of installations *aynchronously* with the current data from the server and sets
129129
an error if one occurs.
130130
- parameter includeKeys: The name(s) of the key(s) to include that are
131-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
131+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
132132
`includeAll` for `Query`.
133133
- parameter options: A set of header options sent to the server. Defaults to an empty set.
134134
- returns: Returns an array of Result enums with the object if a save was successful or a

Sources/ParseSwift/Objects/ParseInstallation+combine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public extension ParseInstallation {
1717
Fetches the `ParseInstallation` *aynchronously* with the current data from the server
1818
and sets an error if one occurs. Publishes when complete.
1919
- parameter includeKeys: The name(s) of the key(s) to include that are
20-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
20+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
2121
`includeAll` for `Query`.
2222
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2323
- returns: A publisher that eventually produces a single value and then finishes or fails.
@@ -124,7 +124,7 @@ public extension Sequence where Element: ParseInstallation {
124124
Fetches a collection of installations *aynchronously* with the current data from the server and sets
125125
an error if one occurs. Publishes when complete.
126126
- parameter includeKeys: The name(s) of the key(s) to include that are
127-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
127+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
128128
`includeAll` for `Query`.
129129
- parameter options: A set of header options sent to the server. Defaults to an empty set.
130130
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was

Sources/ParseSwift/Objects/ParseInstallation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ extension ParseInstallation {
427427
Fetches the `ParseInstallation` *synchronously* with the current data from the server
428428
and sets an error if one occurs.
429429
- parameter includeKeys: The name(s) of the key(s) to include that are
430-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
430+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
431431
`includeAll` for `Query`.
432432
- parameter options: A set of header options sent to the server. Defaults to an empty set.
433433
- throws: An error of `ParseError` type.
@@ -448,7 +448,7 @@ extension ParseInstallation {
448448
/**
449449
Fetches the `ParseInstallation` *asynchronously* and executes the given callback block.
450450
- parameter includeKeys: The name(s) of the key(s) to include that are
451-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
451+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
452452
`includeAll` for `Query`.
453453
- parameter options: A set of header options sent to the server. Defaults to an empty set.
454454
- parameter callbackQueue: The queue to return to after completion. Default
@@ -1274,7 +1274,7 @@ public extension Sequence where Element: ParseInstallation {
12741274
/**
12751275
Fetches a collection of installations *synchronously* all at once and throws an error if necessary.
12761276
- parameter includeKeys: The name(s) of the key(s) to include that are
1277-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
1277+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
12781278
`includeAll` for `Query`.
12791279
- parameter options: A set of header options sent to the server. Defaults to an empty set.
12801280

@@ -1319,7 +1319,7 @@ public extension Sequence where Element: ParseInstallation {
13191319
/**
13201320
Fetches a collection of installations all at once *asynchronously* and executes the completion block when done.
13211321
- parameter includeKeys: The name(s) of the key(s) to include that are
1322-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
1322+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
13231323
`includeAll` for `Query`.
13241324
- parameter options: A set of header options sent to the server. Defaults to an empty set.
13251325
- parameter callbackQueue: The queue to return to after completion. Default value of .main.

Sources/ParseSwift/Objects/ParseObject+async.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public extension ParseObject {
1515
/**
1616
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
1717
- parameter includeKeys: The name(s) of the key(s) to include that are
18-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
18+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
1919
`includeAll` for `Query`.
2020
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2121
- returns: Returns the fetched `ParseObject`.
@@ -111,7 +111,7 @@ public extension Sequence where Element: ParseObject {
111111
Fetches a collection of objects *aynchronously* with the current data from the server and sets
112112
an error if one occurs.
113113
- parameter includeKeys: The name(s) of the key(s) to include that are
114-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
114+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
115115
`includeAll` for `Query`.
116116
- parameter options: A set of header options sent to the server. Defaults to an empty set.
117117
- returns: Returns an array of Result enums with the object if a fetch was successful or a

Sources/ParseSwift/Objects/ParseObject+combine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public extension ParseObject {
1717
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
1818
Publishes when complete.
1919
- parameter includeKeys: The name(s) of the key(s) to include that are
20-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
20+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
2121
`includeAll` for `Query`.
2222
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2323
- returns: A publisher that eventually produces a single value and then finishes or fails.
@@ -118,7 +118,7 @@ public extension Sequence where Element: ParseObject {
118118
Fetches a collection of objects *aynchronously* with the current data from the server and sets
119119
an error if one occurs. Publishes when complete.
120120
- parameter includeKeys: The name(s) of the key(s) to include that are
121-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
121+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
122122
`includeAll` for `Query`.
123123
- parameter options: A set of header options sent to the server. Defaults to an empty set.
124124
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was

Sources/ParseSwift/Objects/ParseObject.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ transactions for this call.
584584
/**
585585
Fetches a collection of objects *synchronously* all at once and throws an error if necessary.
586586
- parameter includeKeys: The name(s) of the key(s) to include that are
587-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
587+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
588588
`includeAll` for `Query`.
589589
- parameter options: A set of header options sent to the server. Defaults to an empty set.
590590
- returns: Returns an array of Result enums with the object if a fetch was successful or a
@@ -625,7 +625,7 @@ transactions for this call.
625625
/**
626626
Fetches a collection of objects all at once *asynchronously* and executes the completion block when done.
627627
- parameter includeKeys: The name(s) of the key(s) to include that are
628-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
628+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
629629
`includeAll` for `Query`.
630630
- parameter options: A set of header options sent to the server. Defaults to an empty set.
631631
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
@@ -819,7 +819,7 @@ extension ParseObject {
819819
/**
820820
Fetches the `ParseObject` *synchronously* with the current data from the server and sets an error if one occurs.
821821
- parameter includeKeys: The name(s) of the key(s) to include that are
822-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
822+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
823823
`includeAll` for `Query`.
824824
- parameter options: A set of header options sent to the server. Defaults to an empty set.
825825
- throws: An error of `ParseError` type.
@@ -837,7 +837,7 @@ extension ParseObject {
837837
/**
838838
Fetches the `ParseObject` *asynchronously* and executes the given callback block.
839839
- parameter includeKeys: The name(s) of the key(s) to include. Use `["*"]` to include
840-
all keys.
840+
all keys one level deep.
841841
- parameter options: A set of header options sent to the server. Defaults to an empty set.
842842
- parameter callbackQueue: The queue to return to after completion. Default
843843
value of .main.

Sources/ParseSwift/Objects/ParseUser+async.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public extension ParseUser {
184184
/**
185185
Fetches the `ParseUser` *aynchronously* with the current data from the server and sets an error if one occurs.
186186
- parameter includeKeys: The name(s) of the key(s) to include that are
187-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
187+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
188188
`includeAll` for `Query`.
189189
- parameter options: A set of header options sent to the server. Defaults to an empty set.
190190
- returns: Returns the fetched `ParseUser`.
@@ -303,7 +303,7 @@ public extension Sequence where Element: ParseUser {
303303
Fetches a collection of users *aynchronously* with the current data from the server and sets
304304
an error if one occurs.
305305
- parameter includeKeys: The name(s) of the key(s) to include that are
306-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
306+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
307307
`includeAll` for `Query`.
308308
- parameter options: A set of header options sent to the server. Defaults to an empty set.
309309
- returns: Returns an array of Result enums with the object if a fetch was successful or a

Sources/ParseSwift/Objects/ParseUser+combine.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public extension ParseUser {
174174
Fetches the `ParseUser` *aynchronously* with the current data from the server and sets an error if one occurs.
175175
Publishes when complete.
176176
- parameter includeKeys: The name(s) of the key(s) to include that are
177-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
177+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
178178
`includeAll` for `Query`.
179179
- parameter options: A set of header options sent to the server. Defaults to an empty set.
180180
- returns: A publisher that eventually produces a single value and then finishes or fails.
@@ -289,7 +289,7 @@ public extension Sequence where Element: ParseUser {
289289
Fetches a collection of users *aynchronously* with the current data from the server and sets
290290
an error if one occurs. Publishes when complete.
291291
- parameter includeKeys: The name(s) of the key(s) to include that are
292-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
292+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
293293
`includeAll` for `Query`.
294294
- parameter options: A set of header options sent to the server. Defaults to an empty set.
295295
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was

Sources/ParseSwift/Objects/ParseUser.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ extension ParseUser {
835835
/**
836836
Fetches the `ParseUser` *synchronously* with the current data from the server and sets an error if one occurs.
837837
- parameter includeKeys: The name(s) of the key(s) to include that are
838-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
838+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
839839
`includeAll` for `Query`.
840840
- parameter options: A set of header options sent to the server. Defaults to an empty set.
841841
- throws: An error of `ParseError` type.
@@ -856,7 +856,7 @@ extension ParseUser {
856856
/**
857857
Fetches the `ParseUser` *asynchronously* and executes the given callback block.
858858
- parameter includeKeys: The name(s) of the key(s) to include that are
859-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
859+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
860860
`includeAll` for `Query`.
861861
- parameter options: A set of header options sent to the server. Defaults to an empty set.
862862
- parameter callbackQueue: The queue to return to after completion. Default
@@ -1692,7 +1692,7 @@ public extension Sequence where Element: ParseUser {
16921692
/**
16931693
Fetches a collection of users *synchronously* all at once and throws an error if necessary.
16941694
- parameter includeKeys: The name(s) of the key(s) to include that are
1695-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
1695+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
16961696
`includeAll` for `Query`.
16971697
- parameter options: A set of header options sent to the server. Defaults to an empty set.
16981698

@@ -1735,7 +1735,7 @@ public extension Sequence where Element: ParseUser {
17351735
/**
17361736
Fetches a collection of users all at once *asynchronously* and executes the completion block when done.
17371737
- parameter includeKeys: The name(s) of the key(s) to include that are
1738-
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
1738+
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
17391739
`includeAll` for `Query`.
17401740
- parameter options: A set of header options sent to the server. Defaults to an empty set.
17411741
- parameter callbackQueue: The queue to return to after completion. Default value of .main.

0 commit comments

Comments
 (0)