Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public func `in`<Expressions: Sequence>(_ lhs: Expression, _ rhs: Expressions, options: NSComparisonPredicate.Options = .caseInsensitive, modifier: NSComparisonPredicate.Modifier = .any) -> NSPredicate where Expressions.Element: Expression {
- return NSComparisonPredicate(leftExpression: lhs.cdqiExpression, rightExpression: NSExpression(forAggregate: rhs.map(\.cdqiExpression)), modifier: modifier, type: .in, options: options)
- }
- public func ==<L: Expression & Inconstant & TypeComparable, R: Expression & TypeComparable, Expressions: Sequence>(lhs: L, rhs: Expressions) -> NSPredicate where L.CDQIComparableType == R.CDQIComparableType, Expressions.Element == R {
- return `in`(lhs, rhs)
- }
- public extension Expression where Self: TypeComparable {
- func cdqiIn<Expressions: Sequence, E: Expression & TypeComparable>(_ rhs: Expressions, options: NSComparisonPredicate.Options = .caseInsensitive, modifier: NSComparisonPredicate.Modifier = .any) -> NSPredicate where Expressions.Element == E, CDQIComparableType == E.CDQIComparableType {
- return `in`(self, rhs, options: options, modifier: modifier)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement