src/Shared/EntityFramework/Core/Query/PlanCompiler/ProviderCommandInfoUtils.cs
// <summary>
// Creates a ProviderCommandInfo for the given node.
// This method should be called when the keys, foreign keys and sort keys are known ahead of time.
// Typically it is used when the original command is factored into multiple commands.
// </summary>
// <param name="command"> The owning command, used for creating VarVecs, etc </param>
// <param name="node"> The root of the sub-command for which a ProviderCommandInfo should be generated </param>
// <returns> The resulting ProviderCommandInfo </returns>
Creates a ProviderCommandInfo for the given node.
This method should be called when the keys, foreign keys and sort keys are known ahead of time.
Typically it is used when the original command is factored into multiple commands.
Creates a ProviderCommandInfo for the given node . This method should be called when the keys foreign keys and sort keys are known ahead of time . Typically it is used when the original command is factored into multiple commands .
[SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "rowtype")]
        [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters",
            MessageId = "System.Data.Entity.Core.Query.PlanCompiler.PlanCompiler.Assert(System.Boolean,System.String)")]
        internal static ProviderCommandInfo Create(
            Command command,
            Node node)
        {
            var projectOp = node.Op as PhysicalProjectOp;
            PlanCompiler.Assert(projectOp != null, "Expected root Op to be a physical Project");
            var ctree = CTreeGenerator.Generate(command, node);
            var cqtree = ctree as DbQueryCommandTree;
            PlanCompiler.Assert(cqtree != null, "null query command tree");
            var collType = TypeHelpers.GetEdmType<md.CollectionType>(cqtree.Query.ResultType);
            PlanCompiler.Assert(md.TypeSemantics.IsRowType(collType.TypeUsage), "command rowtype is not a record");
            BuildOutputVarMap(projectOp, collType.TypeUsage);
            return new ProviderCommandInfo(ctree);
        }
[ SuppressMessage ( " " , " " , MessageId = " " ) ] [ SuppressMessage ( " " , " " , MessageId = " " ) ] internal static ProviderCommandInfo Create ( Command command , Node node ) { var projectOp = node . Op as PhysicalProjectOp ; PlanCompiler . Assert ( projectOp != null , " " ) ; var ctree = CTreeGenerator . Generate ( command , node ) ; var cqtree = ctree as DbQueryCommandTree ; PlanCompiler . Assert ( cqtree != null , " " ) ; var collType = TypeHelpers . GetEdmType < md . CollectionType > ( cqtree . Query . ResultType ) ; PlanCompiler . Assert ( md . TypeSemantics . IsRowType ( collType . TypeUsage ) , " " ) ; BuildOutputVarMap ( projectOp , collType . TypeUsage ) ; return new ProviderCommandInfo ( ctree ) ; }
Creates a ProviderCommandInfo for the given node.
Creates a ProviderCommandInfo for the given node .
// build up the CQT // Get the rowtype for the result cqt // Build up a mapping from Vars to the corresponding output property/column
The resulting ProviderCommandInfo
The resulting ProviderCommandInfo
command
Command
The owning command, used for creating VarVecs, etc
The owning command used for creating VarVecs etc
node
Node
The root of the sub-command for which a ProviderCommandInfo should be generated
The root of the sub - command for which a ProviderCommandInfo should be generated