---
title: "ODQuerySynchronize(_:)"
framework: opendirectory
role: symbol
role_heading: Function
path: "opendirectory/odquerysynchronize(_:)"
---

# ODQuerySynchronize(_:)

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

## Declaration

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

## Parameters

- `query`: The query.

## Discussion

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

## See Also

### Working with Queries

- [ODQueryCopyResults(_:_:_:)](opendirectory/odquerycopyresults(_:_:_:).md)
- [ODQueryCreateWithNode(_:_:_:_:_:_:_:_:_:)](opendirectory/odquerycreatewithnode(_:_:_:_:_:_:_:_:_:).md)
- [ODQueryCreateWithNodeType(_:_:_:_:_:_:_:_:_:)](opendirectory/odquerycreatewithnodetype(_:_:_:_:_:_:_:_:_:).md)
- [ODQueryGetTypeID()](opendirectory/odquerygettypeid().md)
- [ODQueryScheduleWithRunLoop(_:_:_:)](opendirectory/odqueryschedulewithrunloop(_:_:_:).md)
- [ODQuerySetCallback(_:_:_:)](opendirectory/odquerysetcallback(_:_:_:).md)
- [ODQuerySetDispatchQueue(_:_:)](opendirectory/odquerysetdispatchqueue(_:_:).md)
- [ODQueryUnscheduleFromRunLoop(_:_:_:)](opendirectory/odqueryunschedulefromrunloop(_:_:_:).md)
