init(_:entityProvider:comparators:)
Initializes a EntityQueryProperty that applies to entity property at the provided keyPath.
Declaration
init(_ keyPath: KeyPath<Subject, Property>, entityProvider: @escaping (Entity) -> Subject, @EntityQueryComparatorsBuilder<Entity, Subject, Property, PropertyType, ComparatorMappingType> comparators: () -> EntityQueryProperty<Entity, Subject, Property, PropertyType, ComparatorMappingType>.QueryComparators)Parameters
- keyPath:
The keypath to the property that this EntityQueryProperty applies to. The target property type determines which comparator modifiers will be available.
- entityProvider:
Closure which, given a
Entityinstance, returns the appropriateSubjectinstance to applyEntityQueryComparators to. - comparators:
The set of
EntityQueryComparatorsthat this property supports being queried by.