From 0df0c6158ca4c38eacea7cb92bebcc5a0ea8e46a Mon Sep 17 00:00:00 2001 From: Quin Lynch Date: Fri, 26 Apr 2024 15:26:01 -0300 Subject: [PATCH] Add overloads for adding/removing sets for update --- .../Builders/UpdateShapeBuilder.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/EdgeDB.Net.QueryBuilder/Builders/UpdateShapeBuilder.cs b/src/EdgeDB.Net.QueryBuilder/Builders/UpdateShapeBuilder.cs index fd63076c..e0273a6e 100644 --- a/src/EdgeDB.Net.QueryBuilder/Builders/UpdateShapeBuilder.cs +++ b/src/EdgeDB.Net.QueryBuilder/Builders/UpdateShapeBuilder.cs @@ -96,11 +96,24 @@ public UpdateShapeBuilder Add(Expression?>> sele public UpdateShapeBuilder Add(Expression?>> selector, Expression> value) => AddElement(selector, value, ExpressionType.AddAssign); + public UpdateShapeBuilder Add(Expression?>> selector, + Expression>> value) + => AddElement(selector, value, ExpressionType.AddAssign); + + public UpdateShapeBuilder Add(Expression?>> selector, + Expression>> value) + => AddElement(selector, value, ExpressionType.AddAssign); + public UpdateShapeBuilder Remove(Expression?>> selector, Expression> value) => AddElement(selector, value, ExpressionType.SubtractAssign); public UpdateShapeBuilder Remove(Expression?>> selector, Expression> value) => AddElement(selector, value, ExpressionType.SubtractAssign); + public UpdateShapeBuilder Remove(Expression?>> selector, Expression>> value) + => AddElement(selector, value, ExpressionType.SubtractAssign); + public UpdateShapeBuilder Remove(Expression?>> selector, Expression>> value) + => AddElement(selector, value, ExpressionType.SubtractAssign); + private UpdateShapeBuilder AddElement(LambdaExpression selector, LambdaExpression value, ExpressionType type) { var key = ExpressionUtils.GetMemberSelection(selector);