Пример #1
0
        protected override void InternalBindingTraversal(Plan plan, PlanNodeVisitor visitor)
        {
                        #if USEVISIT
            Nodes[0] = visitor.Visit(plan, Nodes[0]);
                        #else
            Nodes[0].BindingTraversal(plan, visitor);
                        #endif

            // Add the computed columns
            plan.EnterRowContext();
            try
            {
                plan.Symbols.Push(new Symbol(String.Empty, SourceTableType.CreateRowType(Keywords.Source)));
                try
                {
                    for (int index = 1; index < Nodes.Count; index++)
                                                #if USEVISIT
                    { Nodes[index] = visitor.Visit(plan, Nodes[index]); }
                                                #else
                    { Nodes[index].BindingTraversal(plan, visitor); }
                                                #endif
                }
                finally
                {
                    plan.Symbols.Pop();
                }
            }
            finally
            {
                plan.ExitRowContext();
            }
        }
Пример #2
0
        protected override void InternalBindingTraversal(Plan plan, PlanNodeVisitor visitor)
        {
                        #if USEVISIT
            Nodes[0] = visitor.Visit(plan, Nodes[0]);
            Nodes[1] = visitor.Visit(plan, Nodes[1]);
                        #else
            Nodes[0].BindingTraversal(plan, visitor);
            Nodes[1].BindingTraversal(plan, visitor);
                        #endif

            plan.EnterRowContext();
            try
            {
                                #if USENAMEDROWVARIABLES
                plan.Symbols.Push(new Symbol(Keywords.Parent, SourceTableType.RowType));
                                #else
                APlan.Symbols.Push(new Symbol(String.Empty, SourceTableType.CreateRowType(Keywords.Parent)));
                                #endif
                try
                {
                                        #if USEVISIT
                    Nodes[2] = visitor.Visit(plan, Nodes[2]);
                                        #else
                    Nodes[2].BindingTraversal(plan, visitor);
                                        #endif
                }
                finally
                {
                    plan.Symbols.Pop();
                }
            }
            finally
            {
                plan.ExitRowContext();
            }
        }