One Logo Pool Ball
Foundation · IOS API REFERENCE

PredicateExpression

protocol · iOS 17.0+ · SDK 27.1

protocol PredicateExpression<Output>

A component expression that makes up part of a predicate. To transform a predicate, define a protocol for the result and add conformance on each predicate expression type that you support. For example: ```swift protocol ProsePredicateExpression { func proseQuery() -> String } // Repeated for each supported operator. extension PredicateExpressions.Equal: ProsePredicateExpression where LHS: ProsePredicateExpression, RHS: ProsePredicateExpression { func proseQuery() -> String { return lhs.proseQuery() + " is equal to " + rhs.proseQuery() } } extension Predicate { func proseQuery() -> String? { guard let expression = expression as? ProsePredicateExpression else { return nil } return expression.proseQuery() } } ```

Members (0)

This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →