Sequence
public extension Sequence where Element: ParseInstallation
public extension Sequence where Element: ParseObject
public extension Sequence where Element: ParseUser
-
fetchAll(includeKeys:
Asynchronousoptions: ) Fetches a collection of installations aynchronously with the current data from the server and sets an error if one occurs.
Throws
An error of typeParseError
.Important
If an object fetched has the same objectId as current, it will automatically update the current.Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Saves a collection of installations asynchronously.
Throws
An error of typeParseError
.Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
createAll(batchLimit:
Asynchronoustransaction: options: ) Creates a collection of installations asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
replaceAll(batchLimit:
Asynchronoustransaction: options: ) Replaces a collection of installations asynchronously.
Throws
An error of typeParseError
.Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
deleteAll(batchLimit:
Asynchronoustransaction: options: ) Deletes a collection of installations asynchronously.
Throws
An error of typeParseError
.Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Each element in the array is
nil
if the delete successful or aParseError
if it failed. -
Fetches a collection of installations aynchronously with the current data from the server and sets an error if one occurs. Publishes when complete.
Important
If an object fetched has the same objectId as current, it will automatically update the current.Declaration
Swift
func fetchAllPublisher(includeKeys: [String]? = nil, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Saves a collection of installations asynchronously and publishes when complete.
Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Creates a collection of installations asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Replaces a collection of installations asynchronously and publishes when complete.
Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Deletes a collection of installations asynchronously and publishes when complete.
Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func deleteAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with
nil
if a delete was successful or aParseError
if it failed. -
Saves a collection of installations synchronously all at once and throws an error if necessary.
Throws
An error of type
ParseError
.Important
If an object saved has the same objectId as current, it will automatically update the current.
Warning
If
transaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are using
ParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of collidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is
.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, // swiftlint:disable:this function_body_length transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
Return Value
Returns a Result enum with the object if a save was successful or a
ParseError
if it failed. -
Saves a collection of installations all at once asynchronously and executes the completion block when done.
Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of collidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Creates a collection of installations all at once asynchronously and executes the completion block when done.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Replaces a collection of installations all at once asynchronously and executes the completion block when done.
Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Fetches a collection of installations synchronously all at once and throws an error if necessary.
Throws
An error of type
ParseError
.Important
If an object fetched has the same objectId as current, it will automatically update the current.
Warning
The order in which installations are returned are not guarenteed. You shouldn’t expect results in any particular order.
Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns a Result enum with the object if a fetch was successful or a
ParseError
if it failed. -
Fetches a collection of installations all at once asynchronously and executes the completion block when done.
Important
If an object fetched has the same objectId as current, it will automatically update the current.Warning
The order in which installations are returned are not guarenteed. You shouldn’t expect results in any particular order.Declaration
Swift
func fetchAll( includeKeys: [String]? = nil, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Deletes a collection of installations synchronously all at once and throws an error if necessary.
Throws
An error of type
ParseError
.Important
If an object deleted has the same objectId as current, it will automatically update the current.
Warning
If
transaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is
.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns
nil
if the delete successful or aParseError
if it failed.- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
- A
-
Deletes a collection of installations all at once asynchronously and executes the completion block when done.
- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll( batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Void, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[ParseError?], ParseError>)
. Each element in the array is eithernil
if the delete successful or aParseError
if it failed. - A
-
fetchAll(includeKeys:
Asynchronousoptions: ) Fetches a collection of objects aynchronously with the current data from the server and sets an error if one occurs.
Throws
An error of typeParseError
.Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Saves a collection of objects asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
createAll(batchLimit:
Asynchronoustransaction: options: ) Creates a collection of objects asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
replaceAll(batchLimit:
Asynchronoustransaction: options: ) Replaces a collection of objects asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
deleteAll(batchLimit:
Asynchronoustransaction: options: ) Deletes a collection of objects asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns
nil
if the delete successful or aParseError
if it failed. -
Fetches a collection of objects aynchronously with the current data from the server and sets an error if one occurs. Publishes when complete.
Declaration
Swift
func fetchAllPublisher(includeKeys: [String]? = nil, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Saves a collection of objects asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Declaration
Swift
func saveAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Creates a collection of objects asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func createAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Replaces a collection of objects asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func replaceAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Deletes a collection of objects asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Declaration
Swift
func deleteAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with
nil
if a delete was successful or aParseError
if it failed. -
Saves a collection of objects synchronously all at once and throws an error if necessary.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, // swiftlint:disable:this function_body_length transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Saves a collection of objects all at once asynchronously and executes the completion block when done.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Creates a collection of objects all at once asynchronously and executes the completion block when done.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Replaces a collection of objects all at once asynchronously and executes the completion block when done.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Fetches a collection of objects synchronously all at once and throws an error if necessary.
Throws
An error of typeParseError
.Warning
The order in which objects are returned are not guarenteed. You shouldn’t expect results in any particular order.Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Fetches a collection of objects all at once asynchronously and executes the completion block when done.
Warning
The order in which objects are returned are not guarenteed. You shouldn’t expect results in any particular order.Declaration
Swift
func fetchAll( includeKeys: [String]? = nil, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Deletes a collection of objects synchronously all at once and throws an error if necessary.
Throws
An error of type
ParseError
.Warning
If
transaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is
.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns
nil
if the delete successful or aParseError
if it failed.- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
- A
-
Deletes a collection of objects all at once asynchronously and executes the completion block when done.
- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll( batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Void, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[ParseError?], ParseError>)
. Each element in the array isnil
if the delete successful or aParseError
if it failed. - A
-
fetchAll(includeKeys:
Asynchronousoptions: ) Fetches a collection of users aynchronously with the current data from the server and sets an error if one occurs.
Throws
An error of typeParseError
.Important
If an object fetched has the same objectId as current, it will automatically update the current.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Saves a collection of users asynchronously.
Throws
An error of typeParseError
.Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
createAll(batchLimit:
Asynchronoustransaction: options: ) Creates a collection of users asynchronously.
Throws
An error of typeParseError
.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
replaceAll(batchLimit:
Asynchronoustransaction: options: ) Replaces a collection of users asynchronously.
Throws
An error of typeParseError
.Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
deleteAll(batchLimit:
Asynchronoustransaction: options: ) Deletes a collection of users asynchronously.
Throws
An error of typeParseError
.Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) async throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Each element in the array is
nil
if the delete successful or aParseError
if it failed. -
Fetches a collection of users aynchronously with the current data from the server and sets an error if one occurs. Publishes when complete.
Important
If an object fetched has the same objectId as current, it will automatically update the current.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func fetchAllPublisher(includeKeys: [String]? = nil, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a fetch was successful or a
ParseError
if it failed. -
Saves a collection of users asynchronously and publishes when complete.
Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Creates a collection of users asynchronously and publishes when complete.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Replaces a collection of users asynchronously and publishes when complete.
Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Self.Element, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with the object if a save was successful or a
ParseError
if it failed. -
Deletes a collection of users asynchronously and publishes when complete.
Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAllPublisher(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) -> Future<[(Result<Void, ParseError>)], ParseError>
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces an an array of Result enums with
nil
if a delete was successful or aParseError
if it failed. -
Saves a collection of users synchronously all at once and throws an error if necessary.
Throws
An error of type
ParseError
.Important
If an object saved has the same objectId as current, it will automatically update the current.
Warning
If
transaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are using
ParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is
.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll(batchLimit limit: Int? = nil, // swiftlint:disable:this function_body_length transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns a Result enum with the object if a save was successful or a
ParseError
if it failed. -
Saves a collection of users all at once asynchronously and executes the completion block when done.
Important
If an object saved has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Warning
If you are usingParseConfiguration.isAllowingCustomObjectIds = true
and plan to generate all of yourobjectId
‘s on the client-side then you should leaveignoringCustomObjectIdConfig = false
. SettingParseConfiguration.isAllowingCustomObjectIds = true
andignoringCustomObjectIdConfig = true
means the client will generateobjectId
’s and the server will generate anobjectId
only when the client does not provide one. This can increase the probability of colliidingobjectId
’s as the client and serverobjectId
’s may be generated using different algorithms. This can also lead to overwriting ofParseObject
’s by accident as the client-side checks are disabled. Developers are responsible for handling such cases.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func saveAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, ignoringCustomObjectIdConfig: Bool = false, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
ignoringCustomObjectIdConfig
Ignore checking for
objectId
whenParseConfiguration.isAllowingCustomObjectIds = true
to allow for mixedobjectId
environments. Defaults to false.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Creates a collection of users all at once asynchronously and executes the completion block when done.
Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func createAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Replaces a collection of users all at once asynchronously and executes the completion block when done.
Important
If an object replaced has the same objectId as current, it will automatically replace the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func replaceAll( // swiftlint:disable:this function_body_length cyclomatic_complexity batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Fetches a collection of users synchronously all at once and throws an error if necessary.
Throws
An error of
ParseError
type.Important
If an object fetched has the same objectId as current, it will automatically update the current.
Warning
The order in which users are returned are not guarenteed. You shouldn’t expect results in any particular order.
Declaration
Swift
func fetchAll(includeKeys: [String]? = nil, options: API.Options = []) throws -> [(Result<Self.Element, ParseError>)]
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns a Result enum with the object if a fetch was successful or a
ParseError
if it failed. -
Fetches a collection of users all at once asynchronously and executes the completion block when done.
Important
If an object fetched has the same objectId as current, it will automatically update the current.Warning
The order in which users are returned are not guarenteed. You shouldn’t expect results in any particular order.Declaration
Swift
func fetchAll( includeKeys: [String]? = nil, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Element, ParseError>)], ParseError>) -> Void )
Parameters
includeKeys
The name(s) of the key(s) to include that are
ParseObject
s. Use["*"]
to include all keys. This is similar toinclude
andincludeAll
forQuery
.options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[(Result<Element, ParseError>)], ParseError>)
. -
Deletes a collection of users synchronously all at once and throws an error if necessary.
Throws
An error of
ParseError
type.Important
If an object deleted has the same objectId as current, it will automatically update the current.
Warning
If
transaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is
.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll(batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = []) throws -> [(Result<Void, ParseError>)]
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns
nil
if the delete successful or aParseError
if it failed.- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
- A
-
Deletes a collection of users all at once asynchronously and executes the completion block when done.
- A
ParseError.Code.aggregateError
. This object’s “errors” property is an array of other Parse.Error objects. Each error object in this array has an “object” property that references the object that could not be deleted (for instance, because that object could not be found). - A non-aggregate Parse.Error. This indicates a serious error that caused the delete operation to be aborted partway through (for instance, a connection failure in the middle of the delete).
Important
If an object deleted has the same objectId as current, it will automatically update the current.Warning
Iftransaction = true
, thenbatchLimit
will be automatically be set to the amount of the objects in the transaction. The developer should ensure their respective Parse Servers can handle the limit or else the transactions can fail.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
func deleteAll( batchLimit limit: Int? = nil, transaction: Bool = ParseSwift.configuration.isUsingTransactions, options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<[(Result<Void, ParseError>)], ParseError>) -> Void )
Parameters
batchLimit
The maximum number of objects to send in each batch. If the items to be batched. is greater than the
batchLimit
, the objects will be sent to the server in waves up to thebatchLimit
. Defaults to 50.transaction
Treat as an all-or-nothing operation. If some operation failure occurs that prevents the transaction from completing, then none of the objects are committed to the Parse Server database.
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
The block to execute. It should have the following argument signature:
(Result<[ParseError?], ParseError>)
. Each element in the array isnil
if the delete successful or aParseError
if it failed. - A