You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This issue tracks progress toward supporting the full range of NSPredicate and NSExpression functions and operators, based on where we are in iOS map SDK v4.0.0 and macOS map SDK v0.7.0. mapbox/mapbox-gl-js#6484 is a corresponding issue that tracks several style specification additions that would block this goal.
Some of these operators already have workarounds. It isn’t necessary to support all of these operators, since some may be a poor fit for manipulating a style. Developers are used to – if sometimes frustrated by – the fact that various Core Data and NSArray backends support different subsets of the NSPredicate and NSExpression vocabulary and grammar.
This issue tracks progress toward supporting the full range of NSPredicate and NSExpression functions and operators, based on where we are in iOS map SDK v4.0.0 and macOS map SDK v0.7.0. mapbox/mapbox-gl-js#6484 is a corresponding issue that tracks several style specification additions that would block this goal.
Some of these operators already have workarounds. It isn’t necessary to support all of these operators, since some may be a poor fit for manipulating a style. Developers are used to – if sometimes frustrated by – the fact that various Core Data and NSArray backends support different subsets of the NSPredicate and NSExpression vocabulary and grammar.
BETWEEN(worked around in v4.0.0/v0.7.0)BEGINSWITH(workaround would be possible withindex-of: Addsliceandindex-ofexpressions mapbox-gl-js#9450)CONTAINS: Remove “in” expression workaround mapbox-gl-native-ios#183ENDSWITH(workaround would be possible withindex-of: Addsliceandindex-ofexpressions mapbox-gl-js#9450)LIKEMATCHES: Implement "regex" expression that returns an array of match groups or… mapbox-gl-js#6228UTI-CONFORMS-TO(probably not needed)UTI-EQUALS(probably not needed)ANY,SOME: limited workaround in Remove “in” expression workaround mapbox-gl-native-ios#183ALL: limited workaround in Remove “in” expression workaround mapbox-gl-native-ios#183NONE: limited workaround in Remove “in” expression workaround mapbox-gl-native-ios#183IN(MATCHis sort of a workaround): Remove “in” expression workaround mapbox-gl-native-ios#183array[index](needs a port ofslice: Addsliceandindex-ofexpressions mapbox-gl-js#9450)array[FIRST]: [ios, macos] Add support for subscripting in expressions. #11770array[LAST]: [ios, macos] Add support for subscripting in expressions. #11770array[SIZE]: [ios, macos] Add support for subscripting in expressions. #11770SUBQUERY(like a list comprehension)UNION(not supported by Core Data)INTERSECT(not supported by Core Data)MINUS(not supported by Core Data)cfor case insensitivity: Port 'Collator' string comparison support to native #11692 Convert between predicate options and collator expressions #12329dfor diacritic insensitivity: Case and diacritic folding for expression operators mapbox-gl-js#4136 Convert between predicate options and collator expressions #12329lfor locale insensitivity: Port 'Collator' string comparison support to native #11692 [ios, macos] Write "collator" wrappers for NSExpression #12269nfor normalizationaverage:(worked around in v4.0.0/v0.7.0)median:: Add some missing math expressions mapbox-gl-js#5853mode:: Add some missing math expressions mapbox-gl-js#5853stddev:: Add some missing math expressions mapbox-gl-js#5853exp:(worked around in v4.0.0/v0.7.0): Add some missing math expressions mapbox-gl-js#5853trunc:(worked around in v4.0.0/v0.7.0)random: Add some missing math expressions mapbox-gl-js#5853randomn:: Add some missing math expressions mapbox-gl-js#5853nowbitwiseAnd:with:bitwiseOr:with:bitwiseXor:with:leftshift:by:rightshift:by:onesComplement:distanceToLocation:fromLocation:: Add distance expression function mapbox-gl-native-ios#295 gets us pretty closearray.subkey(mapping an array to a subkey of its elements)@avg@count@min@max@sum@distinctUnionOfObjects@unionOfObjects@distinctUnionOfArrays@unionOfArrays@distinctUnionOfSets(Sources for this issue included Realm’s “NSPredicate Cheatsheet”.)
/ref mapbox/mapbox-gl-js#5892
/cc @fabian-guerra @anandthakker @ChrisLoer