public bool VisitExprMergeMatchedUpdate(ExprMergeMatchedUpdate expr, TCtx arg) { var res = this.Visit(expr, "MergeMatchedUpdate", arg, out var argOut) && this.Accept("And", expr.And, argOut) && this.Accept("Set", expr.Set, argOut); this._visitor.EndVisitExpr(expr, arg); return(res); }
public bool VisitExprMergeMatchedUpdate(ExprMergeMatchedUpdate mergeMatchedUpdate, IExpr?parent) { if (mergeMatchedUpdate.And != null) { this.Builder.Append(" AND "); mergeMatchedUpdate.And.Accept(this, mergeMatchedUpdate); } this.AssertNotEmptyList(mergeMatchedUpdate.Set, "Set Clause cannot be empty"); this.Builder.Append(" THEN UPDATE SET "); this.AcceptListComaSeparated(mergeMatchedUpdate.Set, mergeMatchedUpdate); return(true); }
public static ExprMergeMatchedUpdate WithSet(this ExprMergeMatchedUpdate original, IReadOnlyList <ExprColumnSetClause> newSet) => new ExprMergeMatchedUpdate(and: original.And, set: newSet);
public static ExprMergeMatchedUpdate WithAnd(this ExprMergeMatchedUpdate original, ExprBoolean?newAnd) => new ExprMergeMatchedUpdate(and: newAnd, set: original.Set);