示例#1
0
        public override void Visit(CaseOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
        {
            PropertyRefList propertyRefList = this.GetPropertyRefList(n);

            for (int index = 1; index < n.Children.Count - 1; index += 2)
            {
                PropertyRefList propertyRefs = propertyRefList.Clone();
                this.AddPropertyRefs(n.Children[index], propertyRefs);
            }
            this.AddPropertyRefs(n.Children[n.Children.Count - 1], propertyRefList.Clone());
            this.VisitChildren(n);
        }
示例#2
0
 protected override void VisitSetOp(SetOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
 {
     foreach (Dictionary <Var, Var> var in op.VarMap)
     {
         foreach (KeyValuePair <Var, Var> keyValuePair in var)
         {
             if (TypeUtils.IsStructuredType(keyValuePair.Key.Type))
             {
                 PropertyRefList propertyRefList = this.GetPropertyRefList(keyValuePair.Key);
                 PropertyRefList propertyRefs;
                 if (op.OpType == OpType.Intersect || op.OpType == OpType.Except)
                 {
                     propertyRefs = PropertyRefList.All;
                     this.AddPropertyRefs(keyValuePair.Key, propertyRefs);
                 }
                 else
                 {
                     propertyRefs = propertyRefList.Clone();
                 }
                 this.AddPropertyRefs(keyValuePair.Value, propertyRefs);
             }
         }
     }
     this.VisitChildren(n);
 }
示例#3
0
        public override void Visit(ScanViewOp op, System.Data.Entity.Core.Query.InternalTrees.Node n)
        {
            System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(op.Table.Columns.Count == 1, "ScanViewOp with multiple columns?");
            PropertyRefList propertyRefList = this.GetPropertyRefList(op.Table.Columns[0]);
            Var             singletonVar    = NominalTypeEliminator.GetSingletonVar(n.Child0);

            System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(singletonVar != null, "cannot determine single Var from ScanViewOp's input");
            this.AddPropertyRefs(singletonVar, propertyRefList.Clone());
            this.VisitChildren(n);
        }