55
66public extension Builders . KeyPathPredicateRightValue where Value == String ? {
77
8- static func hasPrefix( _ prefix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
9- . init { . init( keyPath: $0, operatorString: " BEGINSWITH " , value: prefix) }
8+ static func hasPrefix( _ prefix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
9+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " BEGINSWITH " ) , value: prefix) }
1010 }
1111
12- static func hasNoPrefix( _ prefix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
13- . init { . init( keyPath: $0, operatorString: " BEGINSWITH " , value: prefix, isInverted: true ) }
12+ static func hasNoPrefix( _ prefix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
13+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " BEGINSWITH " ) , value: prefix, isInverted: true ) }
1414 }
1515
16- static func hasSuffix( _ suffix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
17- . init { . init( keyPath: $0, operatorString: " ENDSWITH " , value: suffix) }
16+ static func hasSuffix( _ suffix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
17+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " ENDSWITH " ) , value: suffix) }
1818 }
1919
20- static func hasNoSuffix( _ suffix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
21- . init { . init( keyPath: $0, operatorString: " ENDSWITH " , value: suffix, isInverted: true ) }
20+ static func hasNoSuffix( _ suffix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
21+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " ENDSWITH " ) , value: suffix, isInverted: true ) }
2222 }
2323
24- static func contains( _ other: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
25- . init { . init( keyPath: $0, operatorString: " CONTAINS " , value: other) }
24+ static func contains( _ other: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
25+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " CONTAINS " ) , value: other) }
2626 }
2727
28- static func doesNotContain( _ other: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
29- . init { . init( keyPath: $0, operatorString: " CONTAINS " , value: other, isInverted: true ) }
28+ static func doesNotContain( _ other: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
29+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " CONTAINS " ) , value: other, isInverted: true ) }
3030 }
3131
3232 static func matches( _ pattern: Builders . RegularExpressionPattern ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
@@ -40,28 +40,28 @@ public extension Builders.KeyPathPredicateRightValue where Value == String? {
4040
4141public extension Builders . KeyPathPredicateRightValue where Value == String {
4242
43- static func hasPrefix( _ prefix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
44- . init { . init( keyPath: $0, operatorString: " BEGINSWITH " , value: prefix) }
43+ static func hasPrefix( _ prefix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
44+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " BEGINSWITH " ) , value: prefix) }
4545 }
4646
47- static func hasNoPrefix( _ prefix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
48- . init { . init( keyPath: $0, operatorString: " BEGINSWITH " , value: prefix, isInverted: true ) }
47+ static func hasNoPrefix( _ prefix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
48+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " BEGINSWITH " ) , value: prefix, isInverted: true ) }
4949 }
5050
51- static func hasSuffix( _ suffix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
52- . init { . init( keyPath: $0, operatorString: " ENDSWITH " , value: suffix) }
51+ static func hasSuffix( _ suffix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
52+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " ENDSWITH " ) , value: suffix) }
5353 }
5454
55- static func hasNoSuffix( _ suffix: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
56- . init { . init( keyPath: $0, operatorString: " ENDSWITH " , value: suffix, isInverted: true ) }
55+ static func hasNoSuffix( _ suffix: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
56+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " ENDSWITH " ) , value: suffix, isInverted: true ) }
5757 }
5858
59- static func contains( _ other: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
60- . init { . init( keyPath: $0, operatorString: " CONTAINS " , value: other) }
59+ static func contains( _ other: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
60+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " CONTAINS " ) , value: other) }
6161 }
6262
63- static func doesNotContain( _ other: String ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
64- . init { . init( keyPath: $0, operatorString: " CONTAINS " , value: other, isInverted: true ) }
63+ static func doesNotContain( _ other: String , options : Builders . StringComparisonOptions ? = nil ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
64+ . init { . init( keyPath: $0, operatorString: options . transformOperator ( " CONTAINS " ) , value: other, isInverted: true ) }
6565 }
6666
6767 static func matches( _ pattern: Builders . RegularExpressionPattern ) -> Builders . KeyPathPredicateRightValue < Entity , Value , String > {
0 commit comments