[ios, macos] Documented new aggregate predicate support

This commit is contained in:
Minh Nguyễn
2020-02-27 19:31:20 -08:00
committed by Minh Nguyễn
parent fb559ea8d4
commit 342606db99
4 changed files with 13 additions and 1 deletions

View File

@@ -347,6 +347,7 @@ In style specification | Method, function, or predicate type | Format string syn
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
`in` | `NSInPredicateOperatorType` | `needle IN haystack` or `haystack CONTAINS needle` or `ANY haystack = needle`
`length` | `count:` | `count({1, 2, 2, 3, 4, 7, 9})`
`!` | `NSNotPredicateType` | `NOT (p0 OR … OR pn)`
`!=` | `NSNotEqualToPredicateOperatorType` | `key != value`

View File

@@ -55,6 +55,13 @@ The following aggregate operators are supported:
`NSInPredicateOperatorType` | `key IN { 'iOS', 'macOS', 'tvOS', 'watchOS' }`
`NSContainsPredicateOperatorType` | `{ 'iOS', 'macOS', 'tvOS', 'watchOS' } CONTAINS key`
The following combinations of comparison operators and modifiers are supported:
`NSComparisonPredicateModifier` | `NSPredicateOperatorType` | Format string syntax
--------------------------------|-------------------------------------|---------------------
`NSAllPredicateModifier` | `NSNotEqualToPredicateOperatorType` | `ALL haystack != needle`
`NSAnyPredicateModifier` | `NSEqualToPredicateOperatorType` | `ANY haystack = needle`<br />`SOME haystack = needle`
The following comparison predicate options are supported for comparison and
aggregate operators that are used in the predicate:
@@ -65,7 +72,9 @@ aggregate operators that are used in the predicate:
Other comparison predicate options are unsupported, namely `l`
(for locale sensitivity) and `n` (for normalization). A comparison is
locale-sensitive as long as it is case- or diacritic-insensitive.
locale-sensitive as long as it is case- or diacritic-insensitive. Comparison
predicate options are not supported in conjunction with comparison modifiers
like `ALL` and `ANY`.
### Operands

View File

@@ -340,6 +340,7 @@ In style specification | Method, function, or predicate type | Format string syn
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
`in` | `NSInPredicateOperatorType` | `needle IN haystack` or `haystack CONTAINS needle` or `ANY haystack = needle`
`length` | `count:` | `count({1, 2, 2, 3, 4, 7, 9})`
`!` | `NSNotPredicateType` | `NOT (p0 OR … OR pn)`
`!=` | `NSNotEqualToPredicateOperatorType` | `key != value`

View File

@@ -333,6 +333,7 @@ In style specification | Method, function, or predicate type | Format string syn
`at` | `objectFrom:withIndex:` | `array[n]`
`get` | `+[NSExpression expressionForKeyPath:]` | Key path
`has` | `mgl_does:have:` | `mgl_does:have:(self, 'key')`
`in` | `NSInPredicateOperatorType` | `needle IN haystack` or `haystack CONTAINS needle` or `ANY haystack = needle`
`length` | `count:` | `count({1, 2, 2, 3, 4, 7, 9})`
`!` | `NSNotPredicateType` | `NOT (p0 OR … OR pn)`
`!=` | `NSNotEqualToPredicateOperatorType` | `key != value`