示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public static ExprMergeMatchedUpdate WithSet(this ExprMergeMatchedUpdate original, IReadOnlyList <ExprColumnSetClause> newSet)
 => new ExprMergeMatchedUpdate(and: original.And, set: newSet);
示例#4
0
 public static ExprMergeMatchedUpdate WithAnd(this ExprMergeMatchedUpdate original, ExprBoolean?newAnd)
 => new ExprMergeMatchedUpdate(and: newAnd, set: original.Set);