Skip to content

Commit 550939f

Browse files
committed
refactor: includeAll property -> includeAll()
1 parent 6fc9d2d commit 550939f

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

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/Types/Query.swift

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ public struct Query<T>: Encodable, Equatable where T: ParseObject {
4545
Self.className
4646
}
4747

48-
/**
49-
Includes all nested `ParseObject`s one level deep.
50-
- warning: Requires Parse Server 3.0.0+.
51-
*/
52-
public var includeAll: Query<T> {
53-
var mutableQuery = self
54-
mutableQuery.include = ["*"]
55-
return mutableQuery
56-
}
57-
5848
struct AggregateBody<T>: Encodable where T: ParseObject {
5949
let pipeline: [[String: AnyEncodable]]?
6050
let hint: AnyEncodable?
@@ -265,12 +255,12 @@ public struct Query<T>: Encodable, Equatable where T: ParseObject {
265255
/**
266256
Includes all nested `ParseObject`s one level deep.
267257
- warning: Requires Parse Server 3.0.0+.
268-
- warning: This will be removed in ParseSwift 5.0.0 in favor of the `includeAll` computed property.
269258
- returns: The mutated instance of query for easy chaining.
270259
*/
271-
@available(*, deprecated, message: "Use the computed property instead by removing \"()\"")
272-
public func includeAll(_ keys: [String]? = nil) -> Query<T> {
273-
self.includeAll
260+
public func includeAll() -> Query<T> {
261+
var mutableQuery = self
262+
mutableQuery.include = ["*"]
263+
return mutableQuery
274264
}
275265

276266
/**

0 commit comments

Comments
 (0)