<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "OpenDirectory",
  "identifier" : "/documentation/OpenDirectory/ODQuerySynchronize(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Open Directory"
    ],
    "preciseIdentifier" : "c:@F@ODQuerySynchronize"
  },
  "title" : "ODQuerySynchronize(_:)"
}
-->

# ODQuerySynchronize(_:)

Restarts a query, disposing of any results it has obtained.

```
func ODQuerySynchronize(_ query: ODQueryRef!)
```

## Parameters

`query`

The query.

## Discussion

If `inQuery` was originally scheduled in a run loop with [`ODQueryScheduleWithRunLoop(_:_:_:)`](/documentation/OpenDirectory/ODQueryScheduleWithRunLoop(_:_:_:)), the query’s callback function is called with `inResults` set to `NULL`, `inError.error` set to `kODErrorQuerySynchronize`, and `inError.domain` set to `kODErrorDomainFramework`.

---

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)