2 types derived from CellTreeNode
System.Data.Entity (2)
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (1)
23internal class LeafCellTreeNode : CellTreeNode
System\Data\Mapping\ViewGeneration\Structures\OpCellTreeNode.cs (1)
27internal class OpCellTreeNode : CellTreeNode
194 references to CellTreeNode
System.Data.Entity (194)
System\Data\Mapping\ViewGeneration\BasicViewGenerator.cs (34)
70internal CellTreeNode CreateViewExpression() 87CellTreeNode rootNode = GroupByRightExtent(fojNode); 120internal CellTreeNode GroupByRightExtent(CellTreeNode rootNode) 168private CellTreeNode IsolateUnions(CellTreeNode rootNode) 195ModifiableIteratorCollection<CellTreeNode> childrenSet = new ModifiableIteratorCollection<CellTreeNode>(rootNode.Children); 204CellTreeNode someChild = childrenSet.RemoveOneElement(); 213foreach (CellTreeNode child in childrenSet.Elements()) 230CellTreeNode result = unionNode.Flatten(); 248private CellTreeNode ConvertUnionsToNormalizedLOJs(CellTreeNode rootNode) 267var children = new List<CellTreeNode>(); 276HashSet<CellTreeNode> resultIJDriverChildren = null; 284resultIJDriverChildren = new HashSet<CellTreeNode>(rootNode.Children[0].Children); 292foreach (var child in rootNode.Children.Skip(1)) 309foreach (var child in children) 485internal CellTreeNode IsolateByOperator(CellTreeNode rootNode, CellTreeOpType opTypeToIsolate) 491List<CellTreeNode> children = rootNode.Children; 522ModifiableIteratorCollection<CellTreeNode> childrenSet = new ModifiableIteratorCollection<CellTreeNode>(children); 533CellTreeNode someChild = childrenSet.RemoveOneElement(); 540foreach (CellTreeNode child in childrenSet.Elements()) 580private bool TryAddChildToGroup(CellTreeOpType opTypeToIsolate, CellTreeNode childNode, 627private bool IsDisjoint(CellTreeNode n1, CellTreeNode n2) 638CellTreeNode n = new OpCellTreeNode(m_viewgenContext, CellTreeOpType.IJ, n1, n2); 675private bool IsContainedIn(CellTreeNode n1, CellTreeNode n2) 690CellTreeNode n = new OpCellTreeNode(m_viewgenContext, CellTreeOpType.LASJ, n1, n2); 696private bool IsEquivalentTo(CellTreeNode n1, CellTreeNode n2)
System\Data\Mapping\ViewGeneration\CellTreeSimplifier.cs (42)
40internal static CellTreeNode MergeNodes(CellTreeNode rootNode) 55private CellTreeNode SimplifyTreeByMergingNodes(CellTreeNode rootNode) 71List<CellTreeNode> children = rootNode.Children; 87bool isAssociativeOp = CellTreeNode.IsAssociativeOp(rootNode.OpType); 103CellTreeNode lastChild = null; 105foreach (CellTreeNode child in children) 143CellTreeNode result = newNode.AssociativeFlatten(); 150private CellTreeNode RestructureTreeForMerges(CellTreeNode rootNode) 152List<CellTreeNode> children = rootNode.Children; 153if (CellTreeNode.IsAssociativeOp(rootNode.OpType) == false || children.Count <= 1) 196Helpers.AsSuperTypeList<LeafCellTreeNode, CellTreeNode>(newGrandChildren)); 202CellTreeNode remainingNodes = new OpCellTreeNode(m_viewgenContext, rootNode.OpType, 203Helpers.AsSuperTypeList<OpCellTreeNode, CellTreeNode>(newChildren)); 206CellTreeNode commonNodes = new OpCellTreeNode(m_viewgenContext, commonChildOpType, 207Helpers.AsSuperTypeList<LeafCellTreeNode, CellTreeNode>(commonGrandChildren)); 210CellTreeNode result = new OpCellTreeNode(m_viewgenContext, commonChildOpType, 211new CellTreeNode[] { commonNodes, remainingNodes }); 220private static Set<LeafCellTreeNode> GetCommonGrandChildren(List<CellTreeNode> nodes) 231foreach (CellTreeNode node in nodes) 244else if (CellTreeNode.IsAssociativeOp(opNode.OpType) == false || commonChildOpType != opNode.OpType) 251foreach (CellTreeNode grandChild in opNode.Children) 281private static List<CellTreeNode> GroupLeafChildrenByExtent(List<CellTreeNode> nodes) 284KeyToListMap<EntitySetBase, CellTreeNode> extentMap = 285new KeyToListMap<EntitySetBase, CellTreeNode>(EqualityComparer<EntitySetBase>.Default); 287List<CellTreeNode> newNodes = new List<CellTreeNode>(); 288foreach (CellTreeNode node in nodes) 310private static List<CellTreeNode> GroupNonAssociativeLeafChildren(List<CellTreeNode> nodes) 313KeyToListMap<EntitySetBase, CellTreeNode> extentMap = 314new KeyToListMap<EntitySetBase, CellTreeNode>(EqualityComparer<EntitySetBase>.Default); 316List<CellTreeNode> newNodes = new List<CellTreeNode>(); 317List<CellTreeNode> nonLeafNodes = new List<CellTreeNode>(); 322CellTreeNode node = nodes[i]; 359private bool TryMergeCellQueries(CellTreeOpType opType, ref CellTreeNode node1, 360CellTreeNode node2)
System\Data\Mapping\ViewGeneration\CqlGenerator.cs (2)
33internal CqlGenerator(CellTreeNode view, 56private readonly CellTreeNode m_view;
System\Data\Mapping\ViewGeneration\QueryRewriting\QueryRewriter.cs (7)
62CellTreeNode _basicView; 184internal CellTreeNode BasicView 279CellTreeNode cellTree = TileToCellTree((Tile<FragmentQuery>)caseRewriting, _context); 499CellTreeNode rightDomainQuery = new OpCellTreeNode( 602CellTreeNode rightDomainQuery, Tile<FragmentQuery> unionCaseRewriting) 612CellTreeNode unionTree = TileToCellTree(unionCaseRewriting, _context); 1183internal static CellTreeNode TileToCellTree(Tile<FragmentQuery> tile, ViewgenContext context)
System\Data\Mapping\ViewGeneration\QueryRewriting\RewritingValidator.cs (38)
33private CellTreeNode _basicView; 37internal RewritingValidator(ViewgenContext context, CellTreeNode basicView) 52Dictionary<MemberValueBinding, CellTreeNode> plainMemberValueTrees = CreateMemberValueTrees(false); 55Dictionary<MemberValueBinding, CellTreeNode> complementMemberValueTrees = CreateMemberValueTrees(true); 65CellTreeNode cQueryTree = new LeafCellTreeNode(_viewgenContext, wrapper); 67CellTreeNode sQueryTree; 69CellTreeNode complementSQueryTreeForCondition = complementWhereClauseVisitor.GetCellTreeNode(cell.SQuery.WhereClause); 105CellTreeNode plainSQueryTreeForCondition = plainWhereClauseVisitor.GetCellTreeNode(cell.SQuery.WhereClause); 191private Dictionary<MemberValueBinding, CellTreeNode> CreateMemberValueTrees(bool complementElse) 193Dictionary<MemberValueBinding, CellTreeNode> memberValueTrees = new Dictionary<MemberValueBinding, CellTreeNode>(); 210CellTreeNode cellTreeNode = QueryRewriter.TileToCellTree(rewriting, _viewgenContext); 239private void CheckConstraintsOnProjectedConditionMembers(Dictionary<MemberValueBinding, CellTreeNode> memberValueTrees, LeftCellWrapper wrapper, CellTreeNode sQueryTree, BoolExpression inExtentCondition) 253CellTreeNode sQueryTreeForDomainValue; 259CellTreeNode sCombinedTree = (sQueryTree == _basicView) ? 350private void CheckConstraintsOnNonNullableMembers(Dictionary<MemberValueBinding, CellTreeNode> memberValueTrees, LeftCellWrapper wrapper, CellTreeNode sQueryTree, BoolExpression inExtentCondition) 386private class WhereClauseVisitor : Visitor<DomainConstraint<BoolLiteral, Constant>, CellTreeNode> 389CellTreeNode _topLevelTree; 390Dictionary<MemberValueBinding, CellTreeNode> _memberValueTrees; 392internal WhereClauseVisitor(CellTreeNode topLevelTree, Dictionary<MemberValueBinding, CellTreeNode> memberValueTrees) 400internal CellTreeNode GetCellTreeNode(BoolExpression whereClause) 405internal override CellTreeNode VisitAnd(AndExpr<DomainConstraint<BoolLiteral, Constant>> expression) 407IEnumerable<CellTreeNode> childrenTrees = AcceptChildren(expression.Children); 409foreach (CellTreeNode childNode in childrenTrees) 423internal override CellTreeNode VisitTrue(TrueExpr<DomainConstraint<BoolLiteral, Constant>> expression) 428internal override CellTreeNode VisitTerm(TermExpr<DomainConstraint<BoolLiteral, Constant>> expression) 435CellTreeNode singleNode = null; 453internal override CellTreeNode VisitFalse(FalseExpr<DomainConstraint<BoolLiteral, Constant>> expression) 457internal override CellTreeNode VisitNot(NotExpr<DomainConstraint<BoolLiteral, Constant>> expression) 461internal override CellTreeNode VisitOr(OrExpr<DomainConstraint<BoolLiteral, Constant>> expression) 466private bool TryGetCellTreeNode(MemberPath memberPath, Constant value, out CellTreeNode singleNode) 471private IEnumerable<CellTreeNode> AcceptChildren(IEnumerable<BoolExpr<DomainConstraint<BoolLiteral, Constant>>> children) 480internal class DomainConstraintVisitor : CellTreeNode.SimpleCellTreeVisitor<bool, bool> 493internal static void CheckConstraints(CellTreeNode node, LeftCellWrapper wrapper, 548foreach (CellTreeNode child in node.Children)
System\Data\Mapping\ViewGeneration\Structures\CellTreeNode.cs (6)
36internal CellTreeNode MakeCopy() 39CellTreeNode result = Accept<bool, CellTreeNode>(visitor, true); 68internal abstract List<CellTreeNode> Children { get; } 108internal CellTreeNode Flatten() 127internal CellTreeNode AssociativeFlatten()
System\Data\Mapping\ViewGeneration\Structures\CellTreeNodeVisitors.cs (39)
58private class DefaultCellTreeVisitor<TInput> : CellTreeVisitor<TInput, CellTreeNode> 61internal override CellTreeNode VisitLeaf(LeafCellTreeNode node, TInput param) 66internal override CellTreeNode VisitUnion(OpCellTreeNode node, TInput param) 71internal override CellTreeNode VisitInnerJoin(OpCellTreeNode node, TInput param) 76internal override CellTreeNode VisitLeftOuterJoin(OpCellTreeNode node, TInput param) 81internal override CellTreeNode VisitFullOuterJoin(OpCellTreeNode node, TInput param) 86internal override CellTreeNode VisitLeftAntiSemiJoin(OpCellTreeNode node, TInput param) 93List<CellTreeNode> newChildren = new List<CellTreeNode>(); 94foreach (CellTreeNode child in node.Children) 106private class FlatteningVisitor : SimpleCellTreeVisitor<bool, CellTreeNode> 114internal static CellTreeNode Flatten(CellTreeNode node) 117return node.Accept<bool, CellTreeNode>(visitor, true); 122internal override CellTreeNode VisitLeaf(LeafCellTreeNode node, bool dummy) 128internal override CellTreeNode VisitOpNode(OpCellTreeNode node, bool dummy) 131List<CellTreeNode> flattenedChildren = new List<CellTreeNode>(); 132foreach (CellTreeNode child in node.Children) 134CellTreeNode flattenedChild = child.Accept<bool, CellTreeNode>(this, dummy); 160private class AssociativeOpFlatteningVisitor : SimpleCellTreeVisitor<bool, CellTreeNode> 167internal static CellTreeNode Flatten(CellTreeNode node) 170CellTreeNode newNode = FlatteningVisitor.Flatten(node); 172return newNode.Accept<bool, CellTreeNode>(visitor, true); 177internal override CellTreeNode VisitLeaf(LeafCellTreeNode node, bool dummy) 182internal override CellTreeNode VisitOpNode(OpCellTreeNode node, bool dummy) 184List<CellTreeNode> flattenedChildren = new List<CellTreeNode>(); 186foreach (CellTreeNode child in node.Children) 188CellTreeNode flattenedChild = child.Accept<bool, CellTreeNode>(this, dummy); 196List<CellTreeNode> finalChildren = flattenedChildren; 197if (CellTreeNode.IsAssociativeOp(node.OpType)) 199finalChildren = new List<CellTreeNode>(); 200foreach (CellTreeNode child in flattenedChildren) 227internal static IEnumerable<LeafCellTreeNode> GetLeaves(CellTreeNode node) 240foreach (CellTreeNode child in node.Children)
System\Data\Mapping\ViewGeneration\Structures\LeafCellTreeNode.cs (2)
84internal override List<CellTreeNode> Children { get { return new List<CellTreeNode>(); } }
System\Data\Mapping\ViewGeneration\Structures\OpCellTreeNode.cs (16)
37m_children = new List<CellTreeNode>(); 40internal OpCellTreeNode(ViewgenContext context, CellTreeOpType opType, params CellTreeNode[] children) 41: this(context, opType, (IEnumerable<CellTreeNode>)children) { } 45internal OpCellTreeNode(ViewgenContext context, CellTreeOpType opType, IEnumerable<CellTreeNode> children) 49foreach (CellTreeNode child in children) 59private List<CellTreeNode> m_children; 109internal override List<CellTreeNode> Children { get { return m_children; } } 161internal void Add(CellTreeNode child) 169internal void AddFirst(CellTreeNode child) 176private void Insert(int index, CellTreeNode child) 206foreach (CellTreeNode childNode in Children) 229foreach (CellTreeNode child in Children) 348foreach (CellTreeNode child in Children) 591private static FragmentQuery GenerateFragmentQuery(IEnumerable<CellTreeNode> children, bool isLeft, ViewgenContext context, CellTreeOpType OpType) 597foreach (var child in children.Skip(1)) 648CellTreeNode child = m_children[i];
System\Data\Mapping\ViewGeneration\Validation\ForeignConstraint.cs (3)
227CellTreeNode cNode = childRewriter.BasicView; 228CellTreeNode pNode = parentRewriter.BasicView; 435CellTreeNode pNode = parentRewriter.BasicView;
System\Data\Mapping\ViewGeneration\ViewGenerator.cs (5)
412CellTreeNode basicView = queryRewriter.BasicView; 420CellTreeNode simplifiedView = GenerateSimplifiedView(basicView, queryRewriter.UsedCells); 456private CellTreeNode GenerateSimplifiedView(CellTreeNode basicView, List<LeftCellWrapper> usedCells) 473CellTreeNode simplifiedView = CellTreeSimplifier.MergeNodes(basicView);