Cloud object encapsulates the results of changes to multiple records in a single database operation.
- CloudKit JS 1.0+
It is more efficient to use this class to batch multiple record changes into a single operation than to use the individual record change methods in the
Cloud class. Using this class is especially important if the record types contain
Reference fields. CloudKit ensures that in a graph of related records, target records are saved before source records.
You should not create instances of this class directly. Instead use the
new method in the
Cloud class to get a
Cloud object. Then use the create, replace, and delete methods in this class to build the batch operation. Use the
commit method to execute the batch operation.
For convenience, most methods in this class that add operations return the
Cloud object so that you can chain method calls together; for example: