Esempio n. 1
0
        void VisitX(SqlOutputClause outputClause)
        {
            Visit(outputClause.DeletedTable);
            Visit(outputClause.InsertedTable);
            Visit(outputClause.OutputTable);

            if (outputClause.HasOutputItems)
            {
                foreach (var item in outputClause.OutputItems)
                {
                    Visit(item);
                }
            }

            if (outputClause.OutputColumns != null)
            {
                foreach (var item in outputClause.OutputColumns)
                {
                    Visit(item);
                }
            }
        }
Esempio n. 2
0
        public ICloneableElement Clone(Dictionary <ICloneableElement, ICloneableElement> objectTree, Predicate <ICloneableElement> doClone)
        {
            if (!doClone(this))
            {
                return(this);
            }

            var clone = new SqlOutputClause
            {
                SourceTable   = SourceTable,
                DeletedTable  = DeletedTable,
                InsertedTable = InsertedTable,
                OutputTable   = OutputTable
            };

            if (HasOutputItems)
            {
                clone.OutputItems.AddRange(OutputItems.Select(i => (SqlSetExpression)i.Clone(objectTree, doClone)));
            }

            objectTree.Add(this, clone);

            return(clone);
        }
Esempio n. 3
0
        void VisitX(SqlOutputClause outputClause)
        {
            if (outputClause == null)
            {
                return;
            }

            VisitX(outputClause.SourceTable);
            VisitX(outputClause.DeletedTable);
            VisitX(outputClause.InsertedTable);
            VisitX(outputClause.OutputTable);
            if (outputClause.OutputQuery != null)
            {
                VisitX(outputClause.OutputQuery);
            }

            if (outputClause.HasOutputItems)
            {
                foreach (var item in outputClause.OutputItems)
                {
                    Visit(item);
                }
            }
        }