Instance Property

isAtomic

A Boolean value indicating whether the entire operation fails when one or more records in the same zone cannot be written.

Declaration

var isAtomic: Bool { get set }

Discussion

Modifying records atomically prevents you from updating your data in a way that would leave it in an inconsistent state. You use atomic updates when you want to write multiple records to the same record zone. If there is a failure to modify any of the records in a particular zone, no changes are made to the other records in that same zone. The zone itself must have the atomic capability for this behavior to apply. If a record zone does not support the atomic capability, setting this property has no effect.

The default value of this property is true, which causes all modifications within a single record zone to be made atomically. If your operation object contains records in multiple record zones, a failure in one zone does not prevent modifications to records in a different zone. Changing the value of this property to false causes the records to be modified individually, regardless of whether the record zone supports atomic modifications.

See Also

Configuring the Operation Object

var recordsToSave: [CKRecord]?

The records to save to the database.

var recordIDsToDelete: [CKRecord.ID]?

The IDs of the records to delete permanently from the database.

var savePolicy: CKModifyRecordsOperation.RecordSavePolicy

The policy to apply when the server contains a newer version of a specific record.

var clientChangeTokenData: Data?

A data token used to track client-side changes to records.