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); }
public ElementOp Pop() { ElementOp aux = (ElementOp)this.topo.Proximo; this.topo.Proximo = aux.Proximo; aux.Proximo = null; return(aux); }
// <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; }
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); }
/// <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)); }
/// <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); }
/// <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; }
/// <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(); }
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; }
// <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); }
public override void Visit(ElementOp op, Node n) { VisitScalarOpDefault(op, n); AssertRelOp(n.Child0.Op); }
public ElementOp Push(ElementOp novo) { novo.Proximo = this.topo.Proximo; this.topo.Proximo = novo; return((ElementOp)this.topo.Proximo); }
public PilhaOperadores() { this.topo = new ElementOp(); }
public override void Visit(ElementOp op, System.Data.Entity.Core.Query.InternalTrees.Node n) { throw new NotSupportedException(); }
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); }