Esempio n. 1
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);
        }
        /// <summary>
        /// ScanViewOp
        ///
        /// ask for all properties from the view definition
        /// that have currently been requested from the view itself
        /// </summary>
        /// <param name="op">current ScanViewOp</param>
        /// <param name="n">current node</param>
        public override void Visit(ScanViewOp op, Node n)
        {
            PlanCompiler.Assert(op.Table.Columns.Count == 1, "ScanViewOp with multiple columns?");
            Var             columnVar   = op.Table.Columns[0];
            PropertyRefList columnProps = GetPropertyRefList(columnVar);

            Var inputVar = NominalTypeEliminator.GetSingletonVar(n.Child0);

            PlanCompiler.Assert(inputVar != null, "cannot determine single Var from ScanViewOp's input");

            AddPropertyRefs(inputVar, columnProps.Clone());

            VisitChildren(n);
        }