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