@@ -240,9 +240,7 @@ abstract class Expr internal constructor() {
240
240
* @return A new [Expr] constant instance.
241
241
*/
242
242
@JvmStatic
243
- fun constant (value : VectorValue ): Expr {
244
- return Constant (encodeValue(value))
245
- }
243
+ fun constant (value : VectorValue ): Expr = Constant (encodeValue(value))
246
244
247
245
/* *
248
246
* Create a [Blob] constant from a [ByteArray].
@@ -251,19 +249,15 @@ abstract class Expr internal constructor() {
251
249
* @return A new [Expr] constant instance representing the Blob.
252
250
*/
253
251
@JvmStatic
254
- fun blob (bytes : ByteArray ): Expr {
255
- return constant(Blob .fromBytes(bytes))
256
- }
252
+ fun blob (bytes : ByteArray ): Expr = constant(Blob .fromBytes(bytes))
257
253
258
254
/* *
259
255
* Constant for a null value.
260
256
*
261
257
* @return A [Expr] constant instance.
262
258
*/
263
259
@JvmStatic
264
- fun nullValue (): Expr {
265
- return NULL
266
- }
260
+ fun nullValue (): Expr = NULL
267
261
268
262
/* *
269
263
* Create a vector constant for a [DoubleArray] value.
@@ -272,9 +266,7 @@ abstract class Expr internal constructor() {
272
266
* @return A [Expr] constant instance.
273
267
*/
274
268
@JvmStatic
275
- fun vector (vector : DoubleArray ): Expr {
276
- return Constant (Values .encodeVectorValue(vector))
277
- }
269
+ fun vector (vector : DoubleArray ): Expr = Constant (Values .encodeVectorValue(vector))
278
270
279
271
/* *
280
272
* Create a vector constant for a [VectorValue] value.
@@ -283,9 +275,7 @@ abstract class Expr internal constructor() {
283
275
* @return A [Expr] constant instance.
284
276
*/
285
277
@JvmStatic
286
- fun vector (vector : VectorValue ): Expr {
287
- return Constant (encodeValue(vector))
288
- }
278
+ fun vector (vector : VectorValue ): Expr = Constant (encodeValue(vector))
289
279
290
280
/* *
291
281
* Creates a [Field] instance representing the field at the given path.
@@ -316,9 +306,7 @@ abstract class Expr internal constructor() {
316
306
* @return A new [Field] instance representing the specified path.
317
307
*/
318
308
@JvmStatic
319
- fun field (fieldPath : FieldPath ): Field {
320
- return Field (fieldPath.internalPath)
321
- }
309
+ fun field (fieldPath : FieldPath ): Field = Field (fieldPath.internalPath)
322
310
323
311
@JvmStatic
324
312
fun generic (name : String , vararg expr : Expr ): Expr = FunctionExpr (name, notImplemented, expr)
@@ -3625,6 +3613,14 @@ abstract class Expr internal constructor() {
3625
3613
*/
3626
3614
fun strConcat (vararg strings : Any ): Expr = Companion .strConcat(this , * strings)
3627
3615
3616
+ /* *
3617
+ * Accesses a map (object) value using the provided [keyExpression].
3618
+ *
3619
+ * @param keyExpression The name of the key to remove from this map expression.
3620
+ * @return A new [Expr] representing the value associated with the given key in the map.
3621
+ */
3622
+ fun mapGet (keyExpression : Expr ) = Companion .mapGet(this , keyExpression)
3623
+
3628
3624
/* *
3629
3625
* Accesses a map (object) value using the provided [key].
3630
3626
*
@@ -3647,10 +3643,10 @@ abstract class Expr internal constructor() {
3647
3643
/* *
3648
3644
* Creates an expression that removes a key from this map expression.
3649
3645
*
3650
- * @param key The name of the key to remove from this map expression.
3646
+ * @param keyExpression The name of the key to remove from this map expression.
3651
3647
* @return A new [Expr] that evaluates to a modified map.
3652
3648
*/
3653
- fun mapRemove (key : Expr ) = Companion .mapRemove(this , key )
3649
+ fun mapRemove (keyExpression : Expr ) = Companion .mapRemove(this , keyExpression )
3654
3650
3655
3651
/* *
3656
3652
* Creates an expression that removes a key from this map expression.
0 commit comments