<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKFetchDatabaseChangesOperation/fetchDatabaseChangesResultBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So31CKFetchDatabaseChangesOperationC8CloudKitE05fetchbC11ResultBlockys0H0OySo19CKServerChangeTokenC06serverkL0_Sb10moreComingts5Error_pGcSgvp"
  },
  "title" : "fetchDatabaseChangesResultBlock"
}
-->

# fetchDatabaseChangesResultBlock

The closure to execute when the operation finishes.

```
var fetchDatabaseChangesResultBlock: ((Result<(serverChangeToken: CKServerChangeToken, moreComing: Bool), any Error>) -> Void)? { get set }
```

## Discussion

The closure has no return value and takes the following parameter:

- A <doc://com.apple.documentation/documentation/Swift/Result> that contains either:
  - A successful `Result` of
    - The change token to store and use in subsequent instances of [`CKFetchDatabaseChangesOperation`](/documentation/CloudKit/CKFetchDatabaseChangesOperation).
    - A Boolean that indicates whether this is the final database change. If [`fetchAllChanges`](/documentation/CloudKit/CKFetchDatabaseChangesOperation/fetchAllChanges) is <doc://com.apple.documentation/documentation/Swift/false>, it’s the app’s responsibility to create additional instances of [`CKFetchDatabaseChangesOperation`](/documentation/CloudKit/CKFetchDatabaseChangesOperation) to fetch further changes.
  - An error that contains information about a problem encountered retrieving the database changes.

This closure executes only once, and represents your final opportunity to process the results. The closure executes serially with respect to the other closures of the operation.

Set this property before you execute the operation or submit it to a queue.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)