@@ -67,13 +67,12 @@ public extension Expression {
67
67
68
68
// MARK: Array Operations
69
69
70
- func arrayConcat( _ secondArray : Expression , _ otherArrays : Expression ... ) -> FunctionExpression {
71
- return FunctionExpression ( " array_concat " , [ self , secondArray ] + otherArrays )
70
+ func arrayConcat( _ arrays : [ Expression ] ) -> FunctionExpression {
71
+ return FunctionExpression ( " array_concat " , [ self ] + arrays )
72
72
}
73
73
74
- func arrayConcat( _ secondArray: [ Sendable ] , _ otherArrays: [ Sendable ] ... ) -> FunctionExpression {
75
- let exprs = [ self ] + [ Helper . sendableToExpr ( secondArray) ] + otherArrays
76
- . map { Helper . sendableToExpr ( $0) }
74
+ func arrayConcat( _ arrays: [ [ Sendable ] ] ) -> FunctionExpression {
75
+ let exprs = [ self ] + arrays. map { Helper . sendableToExpr ( $0) }
77
76
return FunctionExpression ( " array_concat " , exprs)
78
77
}
79
78
@@ -198,7 +197,7 @@ public extension Expression {
198
197
return BooleanExpr ( " is_nan " , [ self ] )
199
198
}
200
199
201
- func isNull ( ) -> BooleanExpr {
200
+ func isNil ( ) -> BooleanExpr {
202
201
return BooleanExpr ( " is_null " , [ self ] )
203
202
}
204
203
@@ -214,7 +213,7 @@ public extension Expression {
214
213
return BooleanExpr ( " is_absent " , [ self ] )
215
214
}
216
215
217
- func isNotNull ( ) -> BooleanExpr {
216
+ func isNotNil ( ) -> BooleanExpr {
218
217
return BooleanExpr ( " is_not_null " , [ self ] )
219
218
}
220
219
@@ -288,13 +287,12 @@ public extension Expression {
288
287
return FunctionExpression ( " trim " , [ self ] )
289
288
}
290
289
291
- func strConcat( _ secondString : Expression , _ otherStrings : Expression ... ) -> FunctionExpression {
292
- return FunctionExpression ( " str_concat " , [ self , secondString ] + otherStrings )
290
+ func strConcat( _ strings : [ Expression ] ) -> FunctionExpression {
291
+ return FunctionExpression ( " str_concat " , [ self ] + strings )
293
292
}
294
293
295
- func strConcat( _ secondString: String , _ otherStrings: String ... ) -> FunctionExpression {
296
- let exprs = [ self ] + [ Helper . sendableToExpr ( secondString) ] + otherStrings
297
- . map { Helper . sendableToExpr ( $0) }
294
+ func strConcat( _ strings: [ String ] ) -> FunctionExpression {
295
+ let exprs = [ self ] + strings. map { Helper . sendableToExpr ( $0) }
298
296
return FunctionExpression ( " str_concat " , exprs)
299
297
}
300
298
@@ -359,15 +357,13 @@ public extension Expression {
359
357
return FunctionExpression ( " map_remove " , [ self , keyExpr] )
360
358
}
361
359
362
- func mapMerge( _ secondMap: [ String : Sendable ] ,
363
- _ otherMaps: [ String : Sendable ] ... ) -> FunctionExpression {
364
- let secondMapExpr = Helper . sendableToExpr ( secondMap)
365
- let otherMapExprs = otherMaps. map { Helper . sendableToExpr ( $0) }
366
- return FunctionExpression ( " map_merge " , [ self , secondMapExpr] + otherMapExprs)
360
+ func mapMerge( _ maps: [ [ String : Sendable ] ] ) -> FunctionExpression {
361
+ let mapExprs = maps. map { Helper . sendableToExpr ( $0) }
362
+ return FunctionExpression ( " map_merge " , [ self ] + mapExprs)
367
363
}
368
364
369
- func mapMerge( _ secondMap : Expression , _ otherMaps : Expression ... ) -> FunctionExpression {
370
- return FunctionExpression ( " map_merge " , [ self , secondMap ] + otherMaps )
365
+ func mapMerge( _ maps : [ Expression ] ) -> FunctionExpression {
366
+ return FunctionExpression ( " map_merge " , [ self ] + maps )
371
367
}
372
368
373
369
// --- Added Aggregate Operations (on Expr) ---
@@ -394,23 +390,21 @@ public extension Expression {
394
390
395
391
// MARK: Logical min/max
396
392
397
- func logicalMaximum( _ second : Expression , _ others : Expression ... ) -> FunctionExpression {
398
- return FunctionExpression ( " logical_maximum " , [ self , second ] + others )
393
+ func logicalMaximum( _ expressions : [ Expression ] ) -> FunctionExpression {
394
+ return FunctionExpression ( " logical_maximum " , [ self ] + expressions )
399
395
}
400
396
401
- func logicalMaximum( _ second: Sendable , _ others: Sendable ... ) -> FunctionExpression {
402
- let exprs = [ self ] + [ Helper . sendableToExpr ( second) ] + others
403
- . map { Helper . sendableToExpr ( $0) }
397
+ func logicalMaximum( _ values: [ Sendable ] ) -> FunctionExpression {
398
+ let exprs = [ self ] + values. map { Helper . sendableToExpr ( $0) }
404
399
return FunctionExpression ( " logical_maximum " , exprs)
405
400
}
406
401
407
- func logicalMinimum( _ second : Expression , _ others : Expression ... ) -> FunctionExpression {
408
- return FunctionExpression ( " logical_minimum " , [ self , second ] + others )
402
+ func logicalMinimum( _ expressions : [ Expression ] ) -> FunctionExpression {
403
+ return FunctionExpression ( " logical_minimum " , [ self ] + expressions )
409
404
}
410
405
411
- func logicalMinimum( _ second: Sendable , _ others: Sendable ... ) -> FunctionExpression {
412
- let exprs = [ self ] + [ Helper . sendableToExpr ( second) ] + others
413
- . map { Helper . sendableToExpr ( $0) }
406
+ func logicalMinimum( _ values: [ Sendable ] ) -> FunctionExpression {
407
+ let exprs = [ self ] + values. map { Helper . sendableToExpr ( $0) }
414
408
return FunctionExpression ( " logical_minimum " , exprs)
415
409
}
416
410
0 commit comments