This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Many NSPredicate and NSExpression operators have no equivalent in style JSON #11786
Open
7 of 72 tasks
Labels
gl-ios
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
runtime styling
upstream
Blocked by an issue in a dependency
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
: Addslice
andindex-of
expressions mapbox-gl-js#9450)CONTAINS
: Remove “in” expression workaround mapbox-gl-native-ios#183ENDSWITH
(workaround would be possible withindex-of
: Addslice
andindex-of
expressions mapbox-gl-js#9450)LIKE
MATCHES
: 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
(MATCH
is sort of a workaround): Remove “in” expression workaround mapbox-gl-native-ios#183array[index]
(needs a port ofslice
: Addslice
andindex-of
expressions 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)c
for case insensitivity: Port 'Collator' string comparison support to native #11692 Convert between predicate options and collator expressions #12329d
for diacritic insensitivity: Case and diacritic folding for expression operators mapbox-gl-js#4136 Convert between predicate options and collator expressions #12329l
for locale insensitivity: Port 'Collator' string comparison support to native #11692 [ios, macos] Write "collator" wrappers for NSExpression #12269n
for 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#5853now
bitwiseAnd: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
The text was updated successfully, but these errors were encountered: