One Logo Pool Ball
AppIntents · IOS API REFERENCE

EntityQueryProperty

class · iOS 16.0+ · SDK 27.1

final class EntityQueryProperty<Entity, Subject, Property, PropertyType, ComparatorMappingType> where Entity : AppEntity, Subject : AppEntity, Property : EntityProperty<PropertyType>, PropertyType : _IntentValue, PropertyType : Sendable

An object that provides the supported comparators you use to describe the different ways users can query against a property of an app entity. Entity query properties are defined by by providing a `KeyPath` to an ``AppEntity`` property in your data model that this property applies to and then specify the set of supported ``EntityQueryComparator``s for this property. `EntityQueryProperty` allows you to define more than one ``EntityQueryComparator`` with functionality beyond strict equality. The set of comparators available depends on the underlying property type. For example, an <doc://com.apple.documentation/documentation/Swift/Equatable> property type will allow for ``EqualToComparator`` and ``NotEqualToComparator`` comparators while a <doc://com.apple.documentation/documentation/Swift/Comparable> property type will add support for ``GreaterThanComparator``, ``GreaterThanOrEqualToComparator``, ``LessThanComparator``, and ``LessThanOrEqualToComparator`` comparators. See <doc://com.apple.documentation/documentation/Foundation/Comparator> for more details on available comparators. An `EntityQueryProperty` doesn't necessarily need to apply to a property of its parent Query `Entity`. Consider the scenario where you have an application containing Photo and Album entities, and you want to support querying photos by the name of their containing album. Within a ``EntityPropertyQuery`` in which `Entity` is Photo, you can define a `EntityQueryProperty` mapping to a name property of the Album entity, as long as you supply a closure for `entityProvider` that contains the logic to get from a Photo entity to an Album entity. See ``init(_:entityProvider:comparators:)`` for details.

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

EntityQueryProperty.init(_:entityProvider:comparators:)

This declaration needs Swift generic type arguments. (no canonical witness for Subject)

EntityQueryProperty.init(_:comparators:)

This declaration needs Swift generic type arguments. (no canonical witness for Subject)

All AppIntents types →