@@ -121,80 +121,80 @@ public extension Expression {
121
121
}
122
122
123
123
func greaterThan( _ other: Expression ) -> BooleanExpression {
124
- return BooleanExpression ( " gt " , [ self , other] )
124
+ return BooleanExpression ( " greater_than " , [ self , other] )
125
125
}
126
126
127
127
func greaterThan( _ other: Sendable ) -> BooleanExpression {
128
128
let exprOther = Helper . sendableToExpr ( other)
129
- return BooleanExpression ( " gt " , [ self , exprOther] )
129
+ return BooleanExpression ( " greater_than " , [ self , exprOther] )
130
130
}
131
131
132
132
func greaterThanOrEqual( _ other: Expression ) -> BooleanExpression {
133
- return BooleanExpression ( " gte " , [ self , other] )
133
+ return BooleanExpression ( " greater_than_or_equal " , [ self , other] )
134
134
}
135
135
136
136
func greaterThanOrEqual( _ other: Sendable ) -> BooleanExpression {
137
137
let exprOther = Helper . sendableToExpr ( other)
138
- return BooleanExpression ( " gte " , [ self , exprOther] )
138
+ return BooleanExpression ( " greater_than_or_equal " , [ self , exprOther] )
139
139
}
140
140
141
141
func lessThan( _ other: Expression ) -> BooleanExpression {
142
- return BooleanExpression ( " lt " , [ self , other] )
142
+ return BooleanExpression ( " less_than " , [ self , other] )
143
143
}
144
144
145
145
func lessThan( _ other: Sendable ) -> BooleanExpression {
146
146
let exprOther = Helper . sendableToExpr ( other)
147
- return BooleanExpression ( " lt " , [ self , exprOther] )
147
+ return BooleanExpression ( " less_than " , [ self , exprOther] )
148
148
}
149
149
150
150
func lessThanOrEqual( _ other: Expression ) -> BooleanExpression {
151
- return BooleanExpression ( " lte " , [ self , other] )
151
+ return BooleanExpression ( " less_than_or_equal " , [ self , other] )
152
152
}
153
153
154
154
func lessThanOrEqual( _ other: Sendable ) -> BooleanExpression {
155
155
let exprOther = Helper . sendableToExpr ( other)
156
- return BooleanExpression ( " lte " , [ self , exprOther] )
156
+ return BooleanExpression ( " less_than_or_equal " , [ self , exprOther] )
157
157
}
158
158
159
159
func equal( _ other: Expression ) -> BooleanExpression {
160
- return BooleanExpression ( " eq " , [ self , other] )
160
+ return BooleanExpression ( " equal " , [ self , other] )
161
161
}
162
162
163
163
func equal( _ other: Sendable ) -> BooleanExpression {
164
164
let exprOther = Helper . sendableToExpr ( other)
165
- return BooleanExpression ( " eq " , [ self , exprOther] )
165
+ return BooleanExpression ( " equal " , [ self , exprOther] )
166
166
}
167
167
168
168
func notEqual( _ other: Expression ) -> BooleanExpression {
169
- return BooleanExpression ( " neq " , [ self , other] )
169
+ return BooleanExpression ( " not_equal " , [ self , other] )
170
170
}
171
171
172
172
func notEqual( _ other: Sendable ) -> BooleanExpression {
173
- return BooleanExpression ( " neq " , [ self , Helper . sendableToExpr ( other) ] )
173
+ return BooleanExpression ( " not_equal " , [ self , Helper . sendableToExpr ( other) ] )
174
174
}
175
175
176
176
func equalAny( _ others: [ Expression ] ) -> BooleanExpression {
177
- return BooleanExpression ( " eq_any " , [ self , Helper . array ( others) ] )
177
+ return BooleanExpression ( " equal_any " , [ self , Helper . array ( others) ] )
178
178
}
179
179
180
180
func equalAny( _ others: [ Sendable ] ) -> BooleanExpression {
181
- return BooleanExpression ( " eq_any " , [ self , Helper . array ( others) ] )
181
+ return BooleanExpression ( " equal_any " , [ self , Helper . array ( others) ] )
182
182
}
183
183
184
184
func equalAny( _ arrayExpression: Expression ) -> BooleanExpression {
185
- return BooleanExpression ( " eq_any " , [ self , arrayExpression] )
185
+ return BooleanExpression ( " equal_any " , [ self , arrayExpression] )
186
186
}
187
187
188
188
func notEqualAny( _ others: [ Expression ] ) -> BooleanExpression {
189
- return BooleanExpression ( " not_eq_any " , [ self , Helper . array ( others) ] )
189
+ return BooleanExpression ( " not_equal_any " , [ self , Helper . array ( others) ] )
190
190
}
191
191
192
192
func notEqualAny( _ others: [ Sendable ] ) -> BooleanExpression {
193
- return BooleanExpression ( " not_eq_any " , [ self , Helper . array ( others) ] )
193
+ return BooleanExpression ( " not_equal_any " , [ self , Helper . array ( others) ] )
194
194
}
195
195
196
196
func notEqualAny( _ arrayExpression: Expression ) -> BooleanExpression {
197
- return BooleanExpression ( " not_eq_any " , [ self , arrayExpression] )
197
+ return BooleanExpression ( " not_equal_any " , [ self , arrayExpression] )
198
198
}
199
199
200
200
// MARK: Checks
@@ -260,11 +260,11 @@ public extension Expression {
260
260
}
261
261
262
262
func strContains( _ substring: String ) -> BooleanExpression {
263
- return BooleanExpression ( " str_contains " , [ self , Helper . sendableToExpr ( substring) ] )
263
+ return BooleanExpression ( " string_contains " , [ self , Helper . sendableToExpr ( substring) ] )
264
264
}
265
265
266
266
func strContains( _ expr: Expression ) -> BooleanExpression {
267
- return BooleanExpression ( " str_contains " , [ self , expr] )
267
+ return BooleanExpression ( " string_contains " , [ self , expr] )
268
268
}
269
269
270
270
func startsWith( _ prefix: String ) -> BooleanExpression {
@@ -283,11 +283,11 @@ public extension Expression {
283
283
return BooleanExpression ( " ends_with " , [ self , suffix] )
284
284
}
285
285
286
- func lowercased ( ) -> FunctionExpression {
286
+ func toLower ( ) -> FunctionExpression {
287
287
return FunctionExpression ( " to_lower " , [ self ] )
288
288
}
289
289
290
- func uppercased ( ) -> FunctionExpression {
290
+ func toUpper ( ) -> FunctionExpression {
291
291
return FunctionExpression ( " to_upper " , [ self ] )
292
292
}
293
293
@@ -296,7 +296,7 @@ public extension Expression {
296
296
}
297
297
298
298
func strConcat( _ strings: [ Expression ] ) -> FunctionExpression {
299
- return FunctionExpression ( " str_concat " , [ self ] + strings)
299
+ return FunctionExpression ( " string_concat " , [ self ] + strings)
300
300
}
301
301
302
302
func reverse( ) -> FunctionExpression {
@@ -380,35 +380,35 @@ public extension Expression {
380
380
}
381
381
382
382
func average( ) -> AggregateFunction {
383
- return AggregateFunction ( " avg " , [ self ] )
383
+ return AggregateFunction ( " average " , [ self ] )
384
384
}
385
385
386
386
func minimum( ) -> AggregateFunction {
387
- return AggregateFunction ( " min " , [ self ] )
387
+ return AggregateFunction ( " minimum " , [ self ] )
388
388
}
389
389
390
390
func maximum( ) -> AggregateFunction {
391
- return AggregateFunction ( " max " , [ self ] )
391
+ return AggregateFunction ( " maximum " , [ self ] )
392
392
}
393
393
394
394
// MARK: Logical min/max
395
395
396
396
func logicalMaximum( _ expressions: [ Expression ] ) -> FunctionExpression {
397
- return FunctionExpression ( " max " , [ self ] + expressions)
397
+ return FunctionExpression ( " logical_maximum " , [ self ] + expressions)
398
398
}
399
399
400
400
func logicalMaximum( _ values: [ Sendable ] ) -> FunctionExpression {
401
401
let exprs = [ self ] + values. map { Helper . sendableToExpr ( $0) }
402
- return FunctionExpression ( " max " , exprs)
402
+ return FunctionExpression ( " logical_maximum " , exprs)
403
403
}
404
404
405
405
func logicalMinimum( _ expressions: [ Expression ] ) -> FunctionExpression {
406
- return FunctionExpression ( " min " , [ self ] + expressions)
406
+ return FunctionExpression ( " logical_minimum " , [ self ] + expressions)
407
407
}
408
408
409
409
func logicalMinimum( _ values: [ Sendable ] ) -> FunctionExpression {
410
410
let exprs = [ self ] + values. map { Helper . sendableToExpr ( $0) }
411
- return FunctionExpression ( " min " , exprs)
411
+ return FunctionExpression ( " logical_minimum " , exprs)
412
412
}
413
413
414
414
// MARK: Vector Operations
@@ -503,12 +503,12 @@ public extension Expression {
503
503
}
504
504
505
505
func timestampSub( amount: Expression , unit: Expression ) -> FunctionExpression {
506
- return FunctionExpression ( " timestamp_sub " , [ self , unit, amount] )
506
+ return FunctionExpression ( " timestamp_subtract " , [ self , unit, amount] )
507
507
}
508
508
509
509
func timestampSub( _ amount: Int , _ unit: TimeUnit ) -> FunctionExpression {
510
510
return FunctionExpression (
511
- " timestamp_sub " ,
511
+ " timestamp_subtract " ,
512
512
[ self , Helper . sendableToExpr ( unit) , Helper . sendableToExpr ( amount) ]
513
513
)
514
514
}
0 commit comments