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