266 references to Children
System.Data.Entity (266)
System\Data\Query\InternalTrees\Command.cs (1)
1695varDefListNode.Children.Add(varDefNode);
System\Data\Query\InternalTrees\Dump.cs (10)
166foreach (Node chi in n.Children) { 176if (n.Children.Count > 2) { 193while (i < n.Children.Count) { 194if ((i + 1) < n.Children.Count) { 196VisitNode(n.Children[i++]); 199VisitNode(n.Children[i++]); 204VisitNode(n.Children[i++]); 282foreach (Node chi in n.Children) 371foreach (Node chi in n.Children) { 475foreach (Node chi in n.Children) {
System\Data\Query\InternalTrees\NodeCounter.cs (1)
44foreach (Node child in n.Children)
System\Data\Query\InternalTrees\NodeInfo.cs (13)
170foreach (Node chi in n.Children) 414foreach (Node chi in n.Children) 567foreach (Node varDefNode in varDefListNode.Children) 620foreach (Node chi in n.Child1.Children) 747foreach (Node chi in n.Child1.Children) 762for (int i = 2; i < n.Children.Count; i++) 764foreach (Node chi in n.Children[i].Children) 810foreach (Node chi in n.Children) 1062for (int i = 0; i < n.Children.Count; i++) 1064ExtendedNodeInfo childNodeInfo = n.Children[i].GetExtendedNodeInfo(m_command); 1276foreach (Node chi in n.Children) 1330foreach (Node chi in n.Children)
System\Data\Query\InternalTrees\Nodes.cs (5)
119if (this.Children.Count != other.Children.Count) 128for (int i = 0; i < this.Children.Count; i++) 130if (!this.Children[i].IsEquivalent(other.Children[i]))
System\Data\Query\InternalTrees\OpCopier.cs (1)
252foreach (Node chi in n.Children)
System\Data\Query\InternalTrees\Rule.cs (5)
167if (pattern.Children.Count != original.Children.Count) 169for (int i = 0; i < pattern.Children.Count; i++) 170if (!Match(pattern.Children[i], original.Children[i]))
System\Data\Query\InternalTrees\RuleProcessor.cs (3)
124for (int i = 0; i < subTreeRoot.Children.Count; i++) 126subTreeRoot.Children[i] = ApplyRulesToSubtree(context, rules, subTreeRoot.Children[i], subTreeRoot, i);
System\Data\Query\InternalTrees\Visitors.cs (13)
32foreach (Node chi in n.Children) 44for (int i = n.Children.Count - 1; i >= 0; i--) 46VisitNode(n.Children[i]); 777for (int i = 0; i < n.Children.Count; i++) 779VisitNode(n.Children[i]); 789for (int i = n.Children.Count - 1; i >= 0; i--) 791VisitNode(n.Children[i]); 1659for (int i = 0; i < n.Children.Count; i++) 1661n.Children[i] = VisitNode(n.Children[i]); 1671for (int i = n.Children.Count - 1; i >= 0; i--) 1673n.Children[i] = VisitNode(n.Children[i]);
System\Data\Query\PlanCompiler\AggregatePushdown.cs (12)
441foreach (Node definitionNode in currentNode.Child1.Children) 572List<Node> newChildren = new List<Node>(n.Children.Count); 574for (int i = 0; i < n.Children.Count; i++) 576Node processedChild = VisitNode(n.Children[i]); 581if (!anyChildChanged && !Object.ReferenceEquals(n.Children[i], processedChild)) 694for (int i = 0; i < definingNode.Children.Count; i++) 696Node argumentNode = definingNode.Children[i]; 716foreach (Node child in n.Child3.Children) 765PlanCompiler.Assert(n.Children.Count == 1, "Aggregate Function must have one argument"); 789foreach (Node child in n.Children) 925definingGroupNode.Child2.Children.Add(varDefNode); 942candidate.Key.Children.Clear();
System\Data\Query\PlanCompiler\CTreeGenerator.cs (14)
550EnterVarDefScope(varDefListNode.Children); 647PlanCompiler.Assert(2 == n.Children.Count, string.Format(CultureInfo.InvariantCulture, "Non-Binary {0} encountered", n.Op.GetType().Name)); 652PlanCompiler.Assert(n.Children.Count > index, "VisitChild called with invalid index"); 653return VisitNode(n.Children[index]); 659foreach (Node argNode in n.Children) 804int caseCount = n.Children.Count; 813if(0 == n.Children.Count % 2) 824elseExpr = VisitChild(n, n.Children.Count - 1); 1451if (n.Children.Count > 1) 1464if (n.Children.Count > 1) 1738foreach (Node aggVarDefNode in aggRootNode.Children) 1883if (joinNode.Children.Count > 2) 1963foreach (Node inputNode in n.Children) 2340PlanCompiler.Assert(n.Children.Count == 1, "more than one input to physicalProjectOp?");
System\Data\Query\PlanCompiler\ITreeGenerator.cs (4)
178if (sourceNode.Children.Count > 0) 180MapCopiedNodeVars(sourceNode.Children, copyNode.Children, varMappings); 1289retNode = instance.Children[memberIdx];
System\Data\Query\PlanCompiler\JoinGraph.cs (1)
713foreach (Node chi in node.Children)
System\Data\Query\PlanCompiler\KeyPullup.cs (9)
86foreach (Node chi in n.Children) 234VarVec[] keyVarsMissingFromOutput = new VarVec[n.Children.Count]; 236for (int i = 0; i < n.Children.Count; i++) 238Node branchNode = n.Children[i]; 277for (int i = 0; i < n.Children.Count; i++) 279Node branchNode = n.Children[i]; 367n.Children[i] = m_command.CreateNode(m_command.CreateProjectOp(branchOutputVars), 373m_command.RecomputeNodeInfo(n.Children[i]); 374ExtendedNodeInfo projectNodeInfo = m_command.GetExtendedNodeInfo(n.Children[i]);
System\Data\Query\PlanCompiler\NestPullup.cs (45)
151foreach (Node chi in n.Children) 334foreach (Node chi in n.Children) 430foreach (Node chi in n.Children) 461foreach (Node chi in n.Children) 484foreach (Node chi in n.Children) 511for (int i = 1; i < chi.Children.Count; i++) 513Node newNestChild = ApplyIsNotNullFilter(chi.Children[i], sentinelVar); 520for (int i = 1; i < chi.Children.Count; i++) 522newNestChildren.Add(chi.Children[i]); 725PlanCompiler.Assert(n.HasChild3 && n.Child3.Children.Count > 0, "GroupByIntoOp with no group aggregates?"); 732foreach (Node chi in varDefListNode.Children) 922for (int i = 1; i < nestedNestNode.Children.Count; i++) 928newNestInputs.Add(nestedNestNode.Children[i]); 935for (int i = 1; i < nestNode.Children.Count; i++) 939newNestInputs.Add(nestNode.Children[i]); 994foreach (Node chi in projectNode.Child1.Children) 1126for (int j = 1; j < projectNode.Child0.Children.Count; j++) 1128newNestedNestNodeInputs.Add(projectNode.Child0.Children[j]); 1381newNestNodeChildren = new List<Node>(nestNode.Children); 1394newNestNodeChildren.Add(nestNode.Children[i]); 1404for (int i = 1; i < nestNode.Children.Count; i++) 1406leftCorrelationVars.Or(nestNode.Children[i].GetExtendedNodeInfo(Command).ExternalReferences); 1416List<Node> newProjectOpChildren = new List<Node>(projectNode.Child1.Children.Count); 1417foreach (Node chi in projectNode.Child1.Children) 1896foreach (Node chi in n.Children) 1927PlanCompiler.Assert(n.Children.Count == 1, "multiple inputs to physicalProject?"); 2126for (int i = 1; i < nestNode.Children.Count; i++) 2128Node chi = nestNode.Children[i]; 2137nestNode.Children[i] = ConvertToSingleStreamNest(chi, varRefReplacementMap, childFlattenedOutputVars, out childKeyColumnMaps); 2146VarVec childKeys = Command.CreateVarVec(((SingleStreamNestOp)nestNode.Children[i].Op).Keys); 2262for (int i = 1; i < nestNode.Children.Count; i++) 2364for (int i = 1; i < nestNode.Children.Count; i++) 2366Node inputNode = nestNode.Children[i]; 2419nestNode.Children[i] = augmentedInput; 2482for (int i = 1; i < nestNode.Children.Count; i++) 2506varRemapper.RemapSubtree(nestNode.Children[i]); 2526Node applyNode = Command.CreateNode(op, newDrivingNode, nestNode.Children[i]); 2543for (int j = 1; j < nestNode.Children.Count; j++) 2611for (int i = 0; i < nestNode.Children.Count; i++) 2713m_newCollectionVarDefinitions.Add(newOp.CollectionInfo[i].CollectionVar, result.Children[i + 1]); 2779for (int i = 0; i < n.Children.Count; i++) 2781Node originalChild = n.Children[i]; 2782n.Children[i] = VisitNode(n.Children[i]); 2783if (!Object.ReferenceEquals(originalChild, n.Children[i]) || changedNodes.Contains(originalChild))
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (15)
301return Copy(input.Children[fieldPos]); 778foreach (Node chi in n.Children) 1492n.Children[i] = FixupSetOpChild(n.Children[i], op.VarMap[i], newComputedVars); 1749IEnumerator<Node> inputs = n.Child0.Children.GetEnumerator(); 1750int inputPropertyCount = n.Child0.Children.Count; 1875PlanCompiler.Assert(n.Children.Count == 0, "Constant operations don't have children."); 2066for (int i = 0; i < n.Children.Count - 1; ) 2068Node whenNode = Copy(n.Children[i]); 2072Node propNode = BuildAccessorWithNulls(n.Children[i], property); 2076Node elseNode = BuildAccessorWithNulls(n.Children[n.Children.Count - 1], property); 2733Node discriminator = n.Children[0]; 2775Node fieldValue = n.Children[childrenIndex]; 2819Node fieldValue = n.Children[childrenIndex];
System\Data\Query\PlanCompiler\PlanCompilerUtil.cs (2)
44if (n.Children.Count != 3) 81return ((n.Children.Count == 1) &&
System\Data\Query\PlanCompiler\PreProcessor.cs (24)
1143Node ret = functionImportMappingComposable.GetInternalTree(m_command, n.Children); 1611PlanCompiler.Assert(n.Children.Count > pos, "invalid position " + pos + "; total count = " + n.Children.Count); 1612keyFields.Add(n.Children[pos]); 1760newChildren = n.Children; 1778for (int i = n.Children.Count - 1; i >= entityType.Properties.Count; i--, j--) 1782n.Children.RemoveAt(i); 1801for (int i = entityType.Properties.Count; i < n.Children.Count; i++, j++) 1803prebuiltRelPropertyExprs[copiedRelPropList[j]] = n.Children[i]; 1812newChildren.Add(n.Children[i]); 1861int firstRelPropertyNodeOffset = n.Children.Count - op.RelationshipProperties.Count; 1864newChildren.Add(n.Children[i]); 1870for (int i = firstRelPropertyNodeOffset, j = 0; i < n.Children.Count; i++, j++) 1872prebuiltRelPropertyExprs[op.RelationshipProperties[j]] = n.Children[i]; 1955else if (n.Children.Count == 1 || AreAllConstantsOrNulls(n.Children)) 1959foreach (Node chi in n.Children) 1986for (int i = 0; i < n.Children.Count; i++) 2001List<Node> caseArgNodes = new List<Node>(n.Children.Count * 2 + 1); 2002for (int i = 0; i < n.Children.Count; i++) 2005if (i != (n.Children.Count - 1)) 2016caseArgNodes.Add(n.Children[i]); 2354for (int i = 1; i < n.Child0.Children.Count; i++) 2356sortChildren.Add(n.Child0.Children[i]);
System\Data\Query\PlanCompiler\ProjectionPruner.cs (12)
299foreach (Node chi in n.Children) 485for (int i = n.Children.Count - 1; i >= 2; i--) 487n.Children[i] = VisitNode(n.Children[i]); 500n.Children[1] = VisitNode(n.Children[1]); 503n.Children[0] = VisitNode(n.Children[0]); 532List<Node> constantKeys = varDefListNode.Children.Where(d => d.Op.OpType == OpType.VarDef 544varDefListNode.Children.RemoveAll(c => constantKeys.Contains(c) && constantKeyVars.IsSet(((VarDefOp)c.Op).Var)); 553varDefListNode.Children.Add(keyNode); 569if (result.Op.OpType == OpType.GroupByInto && n.Child3.Children.Count == 0)
System\Data\Query\PlanCompiler\PropertyPushdownHelper.cs (6)
251foreach (Node chi in n.Children) 317for (int i = 1; i < n.Children.Count - 1; i += 2) 320AddPropertyRefs(n.Children[i], cdProps); 322AddPropertyRefs(n.Children[n.Children.Count - 1], pdProps.Clone()); 364foreach (Node chi in n.Children)
System\Data\Query\PlanCompiler\SubqueryTrackingVisitor.cs (3)
124for (int i = 0; i < n.Children.Count; i++) 126n.Children[i] = VisitNode(n.Children[i]);
System\Data\Query\PlanCompiler\TransformationRules.cs (61)
108for (int i = 0; i < node.Children.Count; i++) 110node.Children[i] = ReMap(node.Children[i], varMap); 248foreach (Node child in n.Children) 294foreach (Node chi in varDefListNode.Children) 574foreach (Node chi in node.Children) 881Node elseNode = caseOpNode.Children[caseOpNode.Children.Count - 1]; 886for (int i = 3; i < caseOpNode.Children.Count - 1; i += 2) 888if (!caseOpNode.Children[i].IsEquivalent(firstThenNode)) 919for (int i = 0; i < caseOpNode.Children.Count; ) 922if (i == caseOpNode.Children.Count - 1) 930if (OpType.SoftCast == caseOpNode.Children[i].Op.OpType) 937newNodeArgs.Add(caseOpNode.Children[i]); 945if (OpType.SoftCast == caseOpNode.Children[i + 1].Op.OpType) 951if (caseOpNode.Children[i].Op.OpType != OpType.ConstantPredicate) 955newNodeArgs.Add(caseOpNode.Children[i]); 956newNodeArgs.Add(caseOpNode.Children[i + 1]); 963ConstantPredicateOp constPred = (ConstantPredicateOp)caseOpNode.Children[i].Op; 970newNodeArgs.Add(caseOpNode.Children[j]); 979newNodeArgs.Add(caseOpNode.Children[i + 1]); 1038Node elseChild = caseOpNode.Children[caseOpNode.Children.Count - 1]; 1051caseOpNode.Children.RemoveAt(caseOpNode.Children.Count - 1); 1052caseOpNode.Children.AddRange(elseChild.Children); 1600setOpNode.Children[branchId], 2122foreach (Node varDefNode in varDefListNode.Children) 2140foreach (Node varDefNode in varDefListNode.Children) 2145newVarDefListNode.Children.Add(varDefNode); 2150foreach (Node chi in subProjectNode.Child1.Children) 2155newVarDefListNode.Children.Add(chi); 2225if (n.Child1.Children.Count == 0) 2240foreach (Node varDefNode in n.Child1.Children) 2268foreach (Node varDefNode in n.Child1.Children) 2332if (varDefListNode.Children.Where(c => c.Child0.Op.OpType == OpType.NullSentinel).Count() == 0) 2348if (!canChangeNullSentinelValue || !TransformationRulesContext.TryGetInt32Var(n.Child1.Children.Where(child => child.Child0.Op.OpType == OpType.Constant || child.Child0.Op.OpType == OpType.InternalConstant).Select(child => ((VarDefOp)(child.Op)).Var), out inputSentinel)) 2350inputSentinel = n.Child1.Children.Where(child => child.Child0.Op.OpType == OpType.NullSentinel).Select(child => ((VarDefOp)(child.Op)).Var).FirstOrDefault(); 2360for (int i = n.Child1.Children.Count-1; i >= 0; i--) 2362Node varDefNode = n.Child1.Children[i]; 2376n.Child1.Children.RemoveAt(i); 2719varDefListNode.Children.Count == 1 && 2741foreach (Node varDefNode in varDefListNode.Children) 3043foreach (Node child in n.Children) 3200foreach (Node chi in subTree.Children) 3446varDefNodes.AddRange(joinNode.Child0.Child1.Children); 3447varDefNodes.AddRange(joinNode.Child1.Child1.Children); 3470Node projectNode = joinNode.Children[projectNodeIdx]; 3478ExtendedNodeInfo otherChildInfo = command.GetExtendedNodeInfo(joinNode.Children[otherNodeIdx]); 3487joinNode.Children[projectNodeIdx] = projectNode.Child0; // bypass the projectOp 3835newNode = setOpNode.Children[indexToReturn]; 3883if (n.Child1.Children.Count == 0) 3899foreach (Node varDefNode in n.Child1.Children) 3926foreach (Node varDefNode in n.Child1.Children) 3985if (keys.Children.Count > 0) 4003for (int i = 0; i < projectNodeVarDefList.Children.Count; i++) 4005Node varDefNode = projectNodeVarDefList.Children[i]; 4026Dictionary<Var, Node> varToDefiningNode = new Dictionary<Var, Node>(projectNodeVarDefList.Children.Count); 4027for (int j = 0; j < projectNodeVarDefList.Children.Count; j++) 4029Node varDefNode = projectNodeVarDefList.Children[j];
System\Data\Query\PlanCompiler\VarRefManager.cs (5)
54for(int i=0; i< parent.Children.Count; i++) 57m_nodeToParentMap[parent.Children[i]] = parent; 58m_nodeToSiblingNumber[parent.Children[i]] = i; 88for (int i = m_nodeToSiblingNumber[currentChild] + 1; i < parent.Children.Count; i++) 90if (parent.Children[i].GetNodeInfo(m_command).ExternalReferences.Overlaps(keys))
System\Data\Query\PlanCompiler\VarRemapper.cs (1)
103foreach (Node chi in subTree.Children)