---
title: predicate
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckquery/predicate
---

# predicate

The predicate to use for matching records.

## Declaration

```swift
@NSCopying var predicate: NSPredicate { get }
```

## Discussion

Discussion A predicate contains one or more expressions that evaluate to true or false. Expressions are often value-based comparisons, but predicates support other types of operators, including string comparisons and aggregate operations. For guidelines on how to construct predicates for your queries, see Predicate Rules for Query Objects.

## See Also

### Accessing the Query Parameters

- [recordType](cloudkit/ckquery/recordtype-6ajii.md)
- [sortDescriptors](cloudkit/ckquery/sortdescriptors.md)
