Ejemplo n.º 1
0
        public bool VisitExprMergeOutput(ExprMergeOutput expr, TCtx arg)
        {
            var res = this.Visit(expr, "MergeOutput", arg, out var argOut) && this.Accept("TargetTable", expr.TargetTable, argOut) && this.Accept("Source", expr.Source, argOut) && this.Accept("On", expr.On, argOut) && this.Accept("WhenMatched", expr.WhenMatched, argOut) && this.Accept("WhenNotMatchedByTarget", expr.WhenNotMatchedByTarget, argOut) && this.Accept("WhenNotMatchedBySource", expr.WhenNotMatchedBySource, argOut) && this.Accept("Output", expr.Output, argOut);

            this._visitor.EndVisitExpr(expr, arg);
            return(res);
        }
Ejemplo n.º 2
0
 public bool VisitExprMergeOutput(ExprMergeOutput mergeOutput, IExpr?parent)
 {
     if (this.VisitExprMerge(mergeOutput, mergeOutput))
     {
         this.Builder.Length = this.Builder.Length - 1;// ; <-
         this.Builder.Append(" OUTPUT ");
         mergeOutput.Output.Accept(this, mergeOutput);
         this.Builder.Append(';');
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public static ExprMergeOutput WithOutput(this ExprMergeOutput original, ExprOutput newOutput)
 => new ExprMergeOutput(targetTable: original.TargetTable, source: original.Source, on: original.On, whenMatched: original.WhenMatched, whenNotMatchedByTarget: original.WhenNotMatchedByTarget, whenNotMatchedBySource: original.WhenNotMatchedBySource, output: newOutput);
Ejemplo n.º 4
0
 public static ExprMergeOutput WithSource(this ExprMergeOutput original, IExprTableSource newSource)
 => new ExprMergeOutput(targetTable: original.TargetTable, source: newSource, on: original.On, whenMatched: original.WhenMatched, whenNotMatchedByTarget: original.WhenNotMatchedByTarget, whenNotMatchedBySource: original.WhenNotMatchedBySource, output: original.Output);
Ejemplo n.º 5
0
        ExprMergeOutput IMergeDataBuilderOutputFinal.Done()
        {
            var merge = this.Done();

            return(ExprMergeOutput.FromMerge(merge, this._output.AssertFatalNotNull(nameof(this._output))));
        }