Skip to content

feat: add includeAll computed property to Query #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/4.4.0...main)
* _Contributing to this repo? Add info about your change here to be included in the next release_

__New features__
- 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).

__Improvements__
- 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).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ query2.first { results in
objects.
*/
let query3 = Author.query("name" == "Bruce")
.includeAll()
.includeAll

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

query4.first { results in
switch results {
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseInstallation+async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public extension ParseInstallation {
Fetches the `ParseInstallation` *aynchronously* with the current data from the server
and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns saved `ParseInstallation`.
Expand Down Expand Up @@ -128,7 +128,7 @@ public extension Sequence where Element: ParseInstallation {
Fetches a collection of installations *aynchronously* with the current data from the server and sets
an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns an array of Result enums with the object if a save was successful or a
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseInstallation+combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public extension ParseInstallation {
Fetches the `ParseInstallation` *aynchronously* with the current data from the server
and sets an error if one occurs. Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down Expand Up @@ -124,7 +124,7 @@ public extension Sequence where Element: ParseInstallation {
Fetches a collection of installations *aynchronously* with the current data from the server and sets
an error if one occurs. Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was
Expand Down
8 changes: 4 additions & 4 deletions Sources/ParseSwift/Objects/ParseInstallation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ extension ParseInstallation {
Fetches the `ParseInstallation` *synchronously* with the current data from the server
and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- throws: An error of `ParseError` type.
Expand All @@ -448,7 +448,7 @@ extension ParseInstallation {
/**
Fetches the `ParseInstallation` *asynchronously* and executes the given callback block.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- parameter callbackQueue: The queue to return to after completion. Default
Expand Down Expand Up @@ -1274,7 +1274,7 @@ public extension Sequence where Element: ParseInstallation {
/**
Fetches a collection of installations *synchronously* all at once and throws an error if necessary.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.

Expand Down Expand Up @@ -1319,7 +1319,7 @@ public extension Sequence where Element: ParseInstallation {
/**
Fetches a collection of installations all at once *asynchronously* and executes the completion block when done.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseObject+async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public extension ParseObject {
/**
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns the fetched `ParseObject`.
Expand Down Expand Up @@ -111,7 +111,7 @@ public extension Sequence where Element: ParseObject {
Fetches a collection of objects *aynchronously* with the current data from the server and sets
an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns an array of Result enums with the object if a fetch was successful or a
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseObject+combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public extension ParseObject {
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down Expand Up @@ -118,7 +118,7 @@ public extension Sequence where Element: ParseObject {
Fetches a collection of objects *aynchronously* with the current data from the server and sets
an error if one occurs. Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was
Expand Down
8 changes: 4 additions & 4 deletions Sources/ParseSwift/Objects/ParseObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ transactions for this call.
/**
Fetches a collection of objects *synchronously* all at once and throws an error if necessary.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns an array of Result enums with the object if a fetch was successful or a
Expand Down Expand Up @@ -625,7 +625,7 @@ transactions for this call.
/**
Fetches a collection of objects all at once *asynchronously* and executes the completion block when done.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
Expand Down Expand Up @@ -819,7 +819,7 @@ extension ParseObject {
/**
Fetches the `ParseObject` *synchronously* with the current data from the server and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- throws: An error of `ParseError` type.
Expand All @@ -837,7 +837,7 @@ extension ParseObject {
/**
Fetches the `ParseObject` *asynchronously* and executes the given callback block.
- parameter includeKeys: The name(s) of the key(s) to include. Use `["*"]` to include
all keys.
all keys one level deep.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- parameter callbackQueue: The queue to return to after completion. Default
value of .main.
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseUser+async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public extension ParseUser {
/**
Fetches the `ParseUser` *aynchronously* with the current data from the server and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns the fetched `ParseUser`.
Expand Down Expand Up @@ -303,7 +303,7 @@ public extension Sequence where Element: ParseUser {
Fetches a collection of users *aynchronously* with the current data from the server and sets
an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: Returns an array of Result enums with the object if a fetch was successful or a
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Objects/ParseUser+combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public extension ParseUser {
Fetches the `ParseUser` *aynchronously* with the current data from the server and sets an error if one occurs.
Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down Expand Up @@ -289,7 +289,7 @@ public extension Sequence where Element: ParseUser {
Fetches a collection of users *aynchronously* with the current data from the server and sets
an error if one occurs. Publishes when complete.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces an an array of Result enums with the object if a fetch was
Expand Down
8 changes: 4 additions & 4 deletions Sources/ParseSwift/Objects/ParseUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ extension ParseUser {
/**
Fetches the `ParseUser` *synchronously* with the current data from the server and sets an error if one occurs.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- throws: An error of `ParseError` type.
Expand All @@ -856,7 +856,7 @@ extension ParseUser {
/**
Fetches the `ParseUser` *asynchronously* and executes the given callback block.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- parameter callbackQueue: The queue to return to after completion. Default
Expand Down Expand Up @@ -1692,7 +1692,7 @@ public extension Sequence where Element: ParseUser {
/**
Fetches a collection of users *synchronously* all at once and throws an error if necessary.
- parameter includeKeys: The name(s) of the key(s) to include that are
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
`ParseObject`s. Use `["*"]` to include all keys one level deep. This is similar to `include` and
`includeAll` for `Query`.
- parameter options: A set of header options sent to the server. Defaults to an empty set.

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