---
title: "init(cursor:)"
framework: cloudkit
role: symbol
role_heading: Initializer
path: "cloudkit/ckqueryoperation/init(cursor:)"
---

# init(cursor:)

Creates an operation with additional results from a previous search.

## Declaration

```swift
convenience init(cursor: CKQueryOperation.Cursor)
```

## Parameters

- `cursor`: The cursor that identifies the previous search. CloudKit passes this value to the completion handler of the previous search. For more information, see the doc://com.apple.cloudkit/documentation/CloudKit/CKQueryOperation/queryCompletionBlock property.

## Discussion

Discussion Use this method to create an operation that retrieves the next batch of results from a previous search. When executing searches for a cursor, don’t cache cursors for a long time before using them. A cursor isn’t a snapshot of the previous search results; it stores a relative offset into the results list. An operation that you create from a cursor performs a new search, sorts the new set of results, and uses the previous offset value to determine where the next batch of results starts.

## See Also

### Creating a Query Operation

- [init(query:)](cloudkit/ckqueryoperation/init(query:).md)
- [init()](cloudkit/ckqueryoperation/init().md)
