コード例 #1
0
 public override System.Data.Entity.Core.Query.InternalTrees.Node Visit(ElementOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
 {
     this.AddReference((IEnumerable <Var>) this.m_command.GetExtendedNodeInfo(n.Child0).Definitions);
     n.Child0 = this.VisitNode(n.Child0);
     this.m_command.RecomputeNodeInfo(n);
     return(n);
 }
コード例 #2
0
        public ElementOp Pop()
        {
            ElementOp aux = (ElementOp)this.topo.Proximo;

            this.topo.Proximo = aux.Proximo;
            aux.Proximo       = null;
            return(aux);
        }
コード例 #3
0
ファイル: ProjectionPruner.cs プロジェクト: dotnet/ef6tools
        // <summary>
        // ElementOp
        // An ElementOp that is still present when Projection Prunning is invoked can only get introduced
        // in the TransformationRules phase by transforming an apply operation into a scalar subquery.
        // Such ElementOp serves as root of a defining expression of a VarDefinitionOp node and
        // thus what it produces is useful.
        // </summary>
        // <param name="op"> the ElementOp </param>
        // <param name="n"> Current subtree </param>
        public override Node Visit(ElementOp op, Node n)
        {
            var nodeInfo = m_command.GetExtendedNodeInfo(n.Child0);
            AddReference(nodeInfo.Definitions);

            n.Child0 = VisitNode(n.Child0); // visit the child
            m_command.RecomputeNodeInfo(n);
            return n;
        }
コード例 #4
0
        public static FilaSimbolos PosFixa(FilaSimbolos fila)
        {
            PilhaOperadores pilhaOp        = new PilhaOperadores();
            FilaSimbolos    filaPosFixa    = new FilaSimbolos();
            int             prioridadeTopo = 0;

            while (!fila.FilaVazia())
            {
                ElemSimbolo elem = fila.Desenfileirar();

                if (Validador.EhOperador(elem.Simbolo))
                {
                    ElementOp aux = new ElementOp(elem.Simbolo);

                    if (pilhaOp.Peek() != null)
                    {
                        prioridadeTopo = pilhaOp.Peek().Prioridade;
                    }
                    else
                    {
                        prioridadeTopo = 0;
                    }

                    if (aux.Prioridade <= prioridadeTopo && aux.Simbolo != ")" && aux.Simbolo != "(")
                    {
                        filaPosFixa.Enfileirar(pilhaOp.Pop());
                        pilhaOp.Push(aux);
                    }
                    else if (aux.Prioridade > prioridadeTopo || aux.Simbolo == "(")
                    {
                        pilhaOp.Push(aux);
                    }
                    else if (aux.Simbolo == ")")
                    {
                        while (pilhaOp.Peek().Simbolo != "(")
                        {
                            filaPosFixa.Enfileirar(pilhaOp.Pop());
                        }
                        pilhaOp.Pop();
                    }
                }
                else
                {
                    filaPosFixa.Enfileirar(elem);
                }
            }

            while (pilhaOp.Peek() != null)
            {
                filaPosFixa.Enfileirar(pilhaOp.Pop());
            }


            return(filaPosFixa);
        }
コード例 #5
0
ファイル: OpCopier.cs プロジェクト: dox0/DotNet471RS3
 /// <summary>
 /// Clone an ElementOp
 /// </summary>
 /// <param name="op">The Op to Copy</param>
 /// <param name="n">The Node that references the Op</param>
 /// <returns>A copy of the original Node that references a copy of the original Op</returns>
 public override Node Visit(ElementOp op, Node n)
 {
     return(CopyDefault(m_destCmd.CreateElementOp(op.Type), n));
 }
コード例 #6
0
 /// <summary>
 ///     Visitor pattern method for ElementOp
 /// </summary>
 /// <param name="op"> The ElementOp being visited </param>
 /// <param name="n"> The Node that references the Op </param>
 public virtual void Visit(ElementOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
 }
コード例 #7
0
 /// <summary>
 ///     ElementOp handling
 /// </summary>
 /// <param name="op"> </param>
 /// <param name="n"> </param>
 public override void Visit(ElementOp op, Node n)
 {
     // Cannot occur at this stage of processing
     throw new NotSupportedException();
 }
 public override Node Visit(ElementOp op, Node n)
 {
     return(null);
 }
 public override Node Visit(ElementOp op, Node n)
 {
     return null;
 }
コード例 #10
0
 /// <summary>
 /// ElementOp handling
 /// </summary>
 /// <param name="op"></param>
 /// <param name="n"></param>
 public override void Visit(ElementOp op, Node n)
 {
     // Cannot occur at this stage of processing
     throw EntityUtil.NotSupported();
 }
コード例 #11
0
        public override Node Visit(ElementOp op, Node n)
        {
            VisitScalarOpDefault(op, n); // default processing

            // get to the subquery...
            var subQueryRelOp = n.Child0;
            var projectOp = (ProjectOp)subQueryRelOp.Op;
            PlanCompiler.Assert(projectOp.Outputs.Count == 1, "input to ElementOp has more than one output var?");
            var projectVar = projectOp.Outputs.First;

            var ret = AddSubqueryToParentRelOp(projectVar, subQueryRelOp);
            return ret;
        }
コード例 #12
0
ファイル: OpCopier.cs プロジェクト: Cireson/EntityFramework6
 // <summary>
 // Clone an ElementOp
 // </summary>
 // <param name="op"> The Op to Copy </param>
 // <param name="n"> The Node that references the Op </param>
 // <returns> A copy of the original Node that references a copy of the original Op </returns>
 public override Node Visit(ElementOp op, Node n)
 {
     return CopyDefault(m_destCmd.CreateElementOp(op.Type), n);
 }
コード例 #13
0
 public override void Visit(ElementOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
     AssertRelOp(n.Child0.Op);
 }
コード例 #14
0
 public ElementOp Push(ElementOp novo)
 {
     novo.Proximo      = this.topo.Proximo;
     this.topo.Proximo = novo;
     return((ElementOp)this.topo.Proximo);
 }
コード例 #15
0
 public PilhaOperadores()
 {
     this.topo = new ElementOp();
 }
コード例 #16
0
 public override void Visit(ElementOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
 {
     throw new NotSupportedException();
 }
コード例 #17
0
 public override void Visit(ElementOp op, Node n)
 {
     VisitScalarOpDefault(op, n);
     AssertRelOp(n.Child0.Op);
 }
コード例 #18
0
 /// <summary>
 ///     ElementOp handling
 /// </summary>
 /// <param name="op"> </param>
 /// <param name="n"> </param>
 public override void Visit(ElementOp op, Node n)
 {
     // Cannot occur at this stage of processing
     throw new NotSupportedException();
 }
コード例 #19
0
 /// <summary>
 /// ElementOp handling
 /// </summary>
 /// <param name="op"></param>
 /// <param name="n"></param>
 public override void Visit(ElementOp op, Node n)
 {
     // Cannot occur at this stage of processing
     throw EntityUtil.NotSupported();
 }
コード例 #20
0
 public override System.Data.Entity.Core.Query.InternalTrees.Node Visit(ElementOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
 {
     return((System.Data.Entity.Core.Query.InternalTrees.Node)null);
 }