本文整理汇总了C#中System.Data.Entity.Core.Query.InternalTrees.Command类的典型用法代码示例。如果您正苦于以下问题:C# Command类的具体用法?C# Command怎么用?C# Command使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Command类属于System.Data.Entity.Core.Query.InternalTrees命名空间,在下文中一共展示了Command类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Copy
internal static Node Copy(Command cmd, Node n, out VarMap varMap)
{
var oc = new OpCopier(cmd);
var newNode = oc.CopyNode(n);
varMap = oc.m_varMap;
return newNode;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:7,代码来源:OpCopier.cs
示例2: ComputeHashValue
/// <summary>
/// Compute the hash value for this node
/// </summary>
internal override void ComputeHashValue(Command cmd, Node n)
{
base.ComputeHashValue(cmd, n);
m_hashValue = (m_hashValue << 4) ^ GetHashValue(Definitions);
m_hashValue = (m_hashValue << 4) ^ GetHashValue(Keys.KeyVars);
return;
}
开发者ID:hallco978,项目名称:entityframework,代码行数:10,代码来源:ExtendedNodeInfo.cs
示例3: GroupAggregateVarComputationTranslator
/// <summary>
/// Private constructor
/// </summary>
/// <param name="command"> </param>
/// <param name="groupAggregateVarInfoManager"> </param>
private GroupAggregateVarComputationTranslator(
Command command,
GroupAggregateVarInfoManager groupAggregateVarInfoManager)
{
_command = command;
_groupAggregateVarInfoManager = groupAggregateVarInfoManager;
}
开发者ID:christiandpena,项目名称:entityframework,代码行数:12,代码来源:GroupAggregateVarComputationTranslator.cs
示例4: Table
internal Table(Command command, TableMD tableMetadata, int tableId)
{
m_tableMetadata = tableMetadata;
m_columns = Command.CreateVarList();
m_keys = command.CreateVarVec();
m_nonnullableColumns = command.CreateVarVec();
m_tableId = tableId;
var columnVarMap = new Dictionary<string, ColumnVar>();
foreach (var c in tableMetadata.Columns)
{
var v = command.CreateColumnVar(this, c);
columnVarMap[c.Name] = v;
if (!c.IsNullable)
{
m_nonnullableColumns.Set(v);
}
}
foreach (var c in tableMetadata.Keys)
{
var v = columnVarMap[c.Name];
m_keys.Set(v);
}
m_referencedColumns = command.CreateVarVec(m_columns);
}
开发者ID:christiandpena,项目名称:entityframework,代码行数:27,代码来源:Table.cs
示例5: Process
public static bool Process(Command command)
{
var processor = new NullSemantics(command);
command.Root = processor.VisitNode(command.Root);
return processor._modified;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:8,代码来源:NullSemantics.cs
示例6: Process
// <summary>
// Produces a list of all GroupAggregateVarInfos, each of which represents a single group aggregate
// and it candidate function aggregates. It also produces a delegate that given a child node returns the parent node
// </summary>
internal static IEnumerable<GroupAggregateVarInfo> Process(Command itree, out TryGetValue tryGetParent)
{
var groupRefComputingVisitor = new GroupAggregateRefComputingVisitor(itree);
groupRefComputingVisitor.VisitNode(itree.Root);
tryGetParent = groupRefComputingVisitor._childToParent.TryGetValue;
return groupRefComputingVisitor._groupAggregateVarInfoManager.GroupAggregateVarInfos;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:12,代码来源:GroupAggregateRefComputingVisitor.cs
示例7: Copy
/// <summary>
/// Equivalent to OpCopier.Copy, only in addition it keeps track of the defining subtrees
/// of collection vars defined in the subtree rooted at the copy of the input node n.
/// </summary>
/// <param name="cmd"></param>
/// <param name="n"></param>
/// <param name="varMap"></param>
/// <param name="newCollectionVarDefinitions"></param>
/// <returns></returns>
internal static Node Copy(Command cmd, Node n, out VarMap varMap, out Dictionary<Var, Node> newCollectionVarDefinitions)
{
var oc = new OpCopierTrackingCollectionVars(cmd);
var newNode = oc.CopyNode(n);
varMap = oc.m_varMap;
newCollectionVarDefinitions = oc.m_newCollectionVarDefinitions;
return newNode;
}
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:17,代码来源:OpCopierTrackingCollectionVars.cs
示例8: Process
/// <summary>
/// The driver.
/// Walks the tree, and "pushes" down information about required properties
/// to every node and Var in the tree.
/// </summary>
/// <param name="itree"> The query tree </param>
/// <param name="varPropertyRefs"> List of desired properties from each Var </param>
/// <param name="nodePropertyRefs"> List of desired properties from each node </param>
internal static void Process(
Command itree, out Dictionary<Var, PropertyRefList> varPropertyRefs, out Dictionary<Node, PropertyRefList> nodePropertyRefs)
{
var pph = new PropertyPushdownHelper();
pph.Process(itree.Root);
varPropertyRefs = pph.m_varPropertyRefMap;
nodePropertyRefs = pph.m_nodePropertyRefMap;
}
开发者ID:junxy,项目名称:entityframework,代码行数:17,代码来源:PropertyPushdownHelper.cs
示例9: ExtendedNodeInfo
internal ExtendedNodeInfo(Command cmd)
: base(cmd)
{
m_localDefinitions = cmd.CreateVarVec();
m_definitions = cmd.CreateVarVec();
m_nonNullableDefinitions = cmd.CreateVarVec();
m_nonNullableVisibleDefinitions = cmd.CreateVarVec();
m_keys = new KeyVec(cmd);
m_minRows = RowCount.Zero;
m_maxRows = RowCount.Unbounded;
}
开发者ID:hallco978,项目名称:entityframework,代码行数:11,代码来源:ExtendedNodeInfo.cs
示例10: ComputeHashValue
/// <summary>
/// Computes the hash value for this node. The hash value is simply the
/// local hash value for this node info added with the hash values of the child
/// nodes
/// </summary>
/// <param name="cmd"> current command </param>
/// <param name="n"> current node </param>
internal virtual void ComputeHashValue(Command cmd, Node n)
{
m_hashValue = 0;
foreach (var chi in n.Children)
{
var chiNodeInfo = cmd.GetNodeInfo(chi);
m_hashValue ^= chiNodeInfo.HashValue;
}
m_hashValue = (m_hashValue << 4) ^ ((int)n.Op.OpType); // include the optype somehow
// Now compute my local hash value
m_hashValue = (m_hashValue << 4) ^ GetHashValue(m_externalReferences);
}
开发者ID:christiandpena,项目名称:entityframework,代码行数:20,代码来源:NodeInfo.cs
示例11: Process
internal static void Process(Command command)
{
Node topMostSort;
if (command.Root.Child0 != null
&& command.Root.Child0.Op.OpType == OpType.Sort)
{
topMostSort = command.Root.Child0;
}
else
{
topMostSort = null;
}
var sortRemover = new SortRemover(command, topMostSort);
command.Root = sortRemover.VisitNode(command.Root);
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:15,代码来源:SortRemover.cs
示例12: Create
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");
// build up the CQT
var ctree = CTreeGenerator.Generate(command, node);
var cqtree = ctree as DbQueryCommandTree;
PlanCompiler.Assert(cqtree != null, "null query command tree");
// Get the rowtype for the result cqt
var collType = TypeHelpers.GetEdmType<md.CollectionType>(cqtree.Query.ResultType);
PlanCompiler.Assert(md.TypeSemantics.IsRowType(collType.TypeUsage), "command rowtype is not a record");
// Build up a mapping from Vars to the corresponding output property/column
var outputVarMap = BuildOutputVarMap(projectOp, collType.TypeUsage);
return new ProviderCommandInfo(ctree);
}
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:21,代码来源:ProviderCommandInfoUtils.cs
示例13: GetPushdownPredicate
/// <summary>
/// Split up a predicate into 2 parts - the pushdown and the non-pushdown predicate.
/// If the filter node has no external references *and* the "columns" parameter is null,
/// then the entire predicate can be pushed down
/// We then compute the set of valid column references - if the "columns" parameter
/// is non-null, this set is used. Otherwise, we get the definitions of the
/// input relop node of the filterOp, and use that.
/// We use this list of valid column references to identify which parts of the filter
/// predicate can be pushed down - only those parts of the predicate that do not
/// reference anything beyond these columns are considered for pushdown. The rest are
/// stuffed into the nonPushdownPredicate output parameter
/// </summary>
/// <param name="command"> Command object </param>
/// <param name="filterNode"> the FilterOp subtree </param>
/// <param name="columns"> (Optional) List of columns to consider for "pushdown" </param>
/// <param name="nonPushdownPredicateNode"> (output) Part of the predicate that cannot be pushed down </param>
/// <returns> part of the predicate that can be pushed down </returns>
private static Node GetPushdownPredicate(Command command, Node filterNode, VarVec columns, out Node nonPushdownPredicateNode)
{
var pushdownPredicateNode = filterNode.Child1;
nonPushdownPredicateNode = null;
var filterNodeInfo = command.GetExtendedNodeInfo(filterNode);
if (columns == null
&& filterNodeInfo.ExternalReferences.IsEmpty)
{
return pushdownPredicateNode;
}
if (columns == null)
{
var inputNodeInfo = command.GetExtendedNodeInfo(filterNode.Child0);
columns = inputNodeInfo.Definitions;
}
var predicate = new Predicate(command, pushdownPredicateNode);
Predicate nonPushdownPredicate;
predicate = predicate.GetSingleTablePredicates(columns, out nonPushdownPredicate);
pushdownPredicateNode = predicate.BuildAndTree();
nonPushdownPredicateNode = nonPushdownPredicate.BuildAndTree();
return pushdownPredicateNode;
}
开发者ID:jwanagel,项目名称:jjwtest,代码行数:41,代码来源:FilterOpRules.cs
示例14: OpCopierTrackingCollectionVars
private OpCopierTrackingCollectionVars(Command cmd)
: base(cmd)
{
}
开发者ID:WangWilliam,项目名称:EntityFramework5,代码行数:4,代码来源:OpCopierTrackingCollectionVars.cs
示例15: Process
// <summary>
// Process Driver
// </summary>
// <param name="referencedTypes"> structured types referenced in the query </param>
// <param name="referencedEntitySets"> entitysets referenced in the query </param>
// <param name="freeFloatingEntityConstructorTypes"> entity types that have "free-floating" entity constructors </param>
// <param name="discriminatorMaps"> information on optimized discriminator patterns for entity sets </param>
// <param name="relPropertyHelper"> helper for rel properties </param>
// <param name="typesNeedingNullSentinel"> which types need a null sentinel </param>
internal static void Process(
Command itree,
HashSet<md.TypeUsage> referencedTypes,
HashSet<md.EntitySet> referencedEntitySets,
HashSet<md.EntityType> freeFloatingEntityConstructorTypes,
Dictionary<md.EntitySetBase, DiscriminatorMapInfo> discriminatorMaps,
RelPropertyHelper relPropertyHelper,
HashSet<string> typesNeedingNullSentinel,
out StructuredTypeInfo structuredTypeInfo)
{
structuredTypeInfo = new StructuredTypeInfo(typesNeedingNullSentinel);
structuredTypeInfo.Process(
itree, referencedTypes, referencedEntitySets, freeFloatingEntityConstructorTypes, discriminatorMaps, relPropertyHelper);
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:23,代码来源:StructuredTypeInfo.cs
示例16: Initialize
private void Initialize()
{
// Only support queries for now
var cqtree = m_ctree as cqt.DbQueryCommandTree;
Assert(cqtree != null, "Unexpected command tree kind. Only query command tree is supported.");
// Generate the ITree
m_command = ITreeGenerator.Generate(cqtree);
Assert(m_command != null, "Unable to generate internal tree from Command Tree");
}
开发者ID:junxy,项目名称:entityframework,代码行数:10,代码来源:PlanCompiler.cs
示例17: Replace
/// <summary>
/// "Public" entry point. In the subtree rooted at the given root,
/// replace each occurance of the given vars with their definitions,
/// where each key-value pair in the dictionary is a var-definition pair.
/// </summary>
/// <param name="varReplacementTable"> </param>
/// <param name="root"> </param>
/// <param name="command"> </param>
/// <returns> </returns>
internal static Node Replace(Dictionary<Var, Node> varReplacementTable, Node root, Command command)
{
var replacer = new VarRefReplacer(varReplacementTable, command);
return replacer.VisitNode(root);
}
开发者ID:jwanagel,项目名称:jjwtest,代码行数:14,代码来源:GroupByOpRules.cs
示例18: GroupAggregateRefComputingVisitor
// <summary>
// Private constructor
// </summary>
private GroupAggregateRefComputingVisitor(Command itree)
{
_command = itree;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:7,代码来源:GroupAggregateRefComputingVisitor.cs
示例19: AggregatePushdown
private AggregatePushdown(Command command)
{
m_command = command;
}
开发者ID:Cireson,项目名称:EntityFramework6,代码行数:4,代码来源:AggregatePushdown.cs
示例20: VarRefManager
/// <summary>
/// Constructs a new VarRefManager given a command.
/// </summary>
internal VarRefManager(Command command)
{
m_nodeToParentMap = new Dictionary<Node, Node>();
m_nodeToSiblingNumber = new Dictionary<Node, int>();
m_command = command;
}
开发者ID:hallco978,项目名称:entityframework,代码行数:9,代码来源:VarRefManager.cs
注:本文中的System.Data.Entity.Core.Query.InternalTrees.Command类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论