Filter form | NSPredicateOperatorType /NSCompoundPredicateType |
---|---|
has |
NSContainsPredicateOperatorType |
!has |
NSNotPredicateType (NSContainsPredicateOperatorType ) |
== |
NSEqualToPredicateOperatorType |
!= |
NSNotEqualToPredicateOperatorType |
> |
NSGreaterThanPredicateOperatorType |
>= |
NSGreaterThanOrEqualToPredicateOperatorType |
< |
NSLessThanPredicateOperatorType |
<= |
NSLessThanOrEqualToPredicateOperatorType |
in |
NSInPredicateOperatorType |
!in |
NSNotPredicateType (NSInPredicateOperatorType ) |
all |
NSAndPredicateType |
any |
NSOrPredicateType |
none |
NSNotPredicateType (NSOrPredicateType ) |
Not supported directly but could be translated:
NSBetweenPredicateOperatorType
NSNotPredicateType
Unsupported, but that’s OK because a predicate-supporting backend isn’t required to support everything:
NSMatchesPredicateOperatorType
NSLikePredicateOperatorType
NSBeginsWithPredicateOperatorType
NSEndsWithPredicateOperatorType
NSCustomSelectorPredicateOperatorType
Key paths in NSPredicate format strings can’t contain special characters like -
or $
, but you can use the %K
placeholder: NSPredicate(format: "admin_level > 3 AND %K == 'Polygon'", "$type")
.