199 references to m_command
System.Data.Entity (199)
System\Data\Query\PlanCompiler\Normalizer.cs (26)
69
m_command
.Root = VisitNode(
m_command
.Root);
101
Node projectNode =
m_command
.BuildProject(
103
m_command
.CreateNode(
m_command
.CreateInternalConstantOp(
m_command
.IntegerType, 1)),
120
Node varDefNode =
m_command
.CreateVarDefNode(collectionNode, out newVar);
121
UnnestOp unnestOp =
m_command
.CreateUnnestOp(newVar);
122
Node unnestNode =
m_command
.CreateNode(unnestOp, varDefNode);
139
PhysicalProjectOp projectOp =
m_command
.CreatePhysicalProjectOp(unnestOp.Table.Columns[0]);
140
Node projectNode =
m_command
.CreateNode(projectOp, unnestNode);
141
CollectOp collectOp =
m_command
.CreateCollectOp(n.Op.Type);
142
Node collectNode =
m_command
.CreateNode(collectOp, projectNode);
186
AggregateOp aggregateOp =
m_command
.CreateAggregateOp(op.Function, false);
187
VarRefOp unnestVarRefOp =
m_command
.CreateVarRefOp(unnestOutputVar);
188
Node unnestVarRefNode =
m_command
.CreateNode(unnestVarRefOp);
191
unnestVarRefNode =
m_command
.CreateNode(
m_command
.CreateSoftCastOp(softCastType), unnestVarRefNode);
193
Node aggExprNode =
m_command
.CreateNode(aggregateOp, unnestVarRefNode);
195
VarVec keyVars =
m_command
.CreateVarVec(); // empty keys
196
Node keyVarDefListNode =
m_command
.CreateNode(
m_command
.CreateVarDefListOp());
198
VarVec gbyOutputVars =
m_command
.CreateVarVec();
200
Node aggVarDefListNode =
m_command
.CreateVarDefListNode(aggExprNode, out aggVar);
202
GroupByOp gbyOp =
m_command
.CreateGroupByOp(keyVars, gbyOutputVars);
203
Node gbySubqueryNode =
m_command
.CreateNode(gbyOp, unnestNode, keyVarDefListNode, aggVarDefListNode);
System\Data\Query\PlanCompiler\PreProcessor.cs (161)
142
m_relPropertyHelper = new RelPropertyHelper(
m_command
.MetadataWorkspace,
m_command
.ReferencedRelProperties);
178
m_command
.Root = VisitNode(
m_command
.Root);
183
foreach (Var v in
m_command
.Vars)
199
PhysicalProjectOp ppOp = (PhysicalProjectOp)
m_command
.Root.Op; // this better be the case or we have other problems.
345
if (
m_command
.MetadataWorkspace.TryGetGeneratedViewOfType(entitySet, requiredType, includeSubtypes, out definingQuery))
366
definingQuery =
m_command
.MetadataWorkspace.GetGeneratedView(entitySet);
380
Node ret = definingQuery.GetInternalTree(
m_command
);
390
ScanViewOp scanViewOp =
m_command
.CreateScanViewOp(scanTableOp.Table);
391
ret =
m_command
.CreateNode(scanViewOp, ret);
484
PlanCompiler.Assert(
m_command
.IsRelPropertyReferenced(navigateOp.RelProperty),
486
Op relPropertyOp =
m_command
.CreateRelPropertyOp(navigateOp.RelProperty);
487
Node relPropertyNode =
m_command
.CreateNode(relPropertyOp,
505
return
m_command
.CreateNode(
m_command
.CreateNullOp(navigateOp.Type));
509
return
m_command
.CreateNode(
m_command
.CreateNewMultisetOp(navigateOp.Type));
521
ScanTableOp tableOp =
m_command
.CreateScanTableOp(tableMD);
522
Node branchNode =
m_command
.CreateNode(tableOp);
530
m_command
.BuildUnionAllLadder(scanTableNodes, scanTableVars, out unionAllNode, out unionAllVar);
535
Node targetEnd =
m_command
.CreateNode(
m_command
.CreatePropertyOp(navigateOp.ToEnd),
536
m_command
.CreateNode(
m_command
.CreateVarRefOp(unionAllVar)));
537
Node sourceEnd =
m_command
.CreateNode(
m_command
.CreatePropertyOp(navigateOp.FromEnd),
538
m_command
.CreateNode(
m_command
.CreateVarRefOp(unionAllVar)));
539
Node predicateNode =
m_command
.BuildComparison(OpType.EQ, navigateOpNode.Child0, sourceEnd);
540
Node filterNode =
m_command
.CreateNode(
m_command
.CreateFilterOp(),
543
Node projectNode =
m_command
.BuildProject(filterNode, targetEnd, out projectVar);
551
ret =
m_command
.BuildCollect(projectNode, projectVar);
577
ScanTableOp tableOp =
m_command
.CreateScanTableOp(tableMetadata);
578
Node tableNode =
m_command
.CreateNode(tableOp);
587
m_command
.BuildOfTypeTree(tableNode, tableVar, ofType, true, out resultNode, out resultVar);
631
return
m_command
.CreateNode(
m_command
.CreateNullOp(entityType));
646
m_command
.BuildUnionAllLadder(scanTableNodes, scanTableVars, out unionAllNode, out unionAllVar);
651
Node entityRefNode =
m_command
.CreateNode(
652
m_command
.CreateGetEntityRefOp(derefOpNode.Child0.Op.Type),
653
m_command
.CreateNode(
m_command
.CreateVarRefOp(unionAllVar)));
654
Node keyComparisonPred =
m_command
.BuildComparison(OpType.EQ, derefOpNode.Child0, entityRefNode);
655
Node filterNode =
m_command
.CreateNode(
656
m_command
.CreateFilterOp(),
723
Node joinPredicate =
m_command
.BuildComparison(OpType.EQ,
724
m_command
.CreateNode(
m_command
.CreateGetEntityRefOp(end.TypeUsage),
m_command
.CreateNode(
m_command
.CreateVarRefOp(esVar))),
725
m_command
.CreateNode(
m_command
.CreatePropertyOp(end),
m_command
.CreateNode(
m_command
.CreateVarRefOp(rsVar)))
728
Node joinNode =
m_command
.CreateNode(
m_command
.CreateInnerJoinOp(),
755
RelPropertyOp relPropertyOp =
m_command
.CreateRelPropertyOp(relProperty);
756
Node relPropertyNode =
m_command
.CreateNode(relPropertyOp, sourceEntityNode);
757
DerefOp derefOp =
m_command
.CreateDerefOp(resultType);
758
Node derefNode =
m_command
.CreateNode(derefOp, relPropertyNode);
782
ret =
m_command
.BuildCollect(ret, outputVar);
860
m_command
.BuildUnionAllLadder(scanTableNodes, scanTableVars, out unionAllNode, out outputVar);
866
PlanCompiler.Assert(
m_command
.IsRelPropertyReferenced(inverseRelProperty),
868
Node inverseRelPropertyNode =
m_command
.CreateNode(
869
m_command
.CreateRelPropertyOp(inverseRelProperty),
870
m_command
.CreateNode(
m_command
.CreateVarRefOp(outputVar)));
871
Node predicateNode =
m_command
.BuildComparison(OpType.EQ,
873
Node ret =
m_command
.CreateNode(
m_command
.CreateFilterOp(), unionAllNode, predicateNode);
932
m_command
.BuildUnionAllLadder(joinNodes, outputVars, out unionAllNode, out unionAllVars);
937
Node rsSourceRefNode =
m_command
.CreateNode(
m_command
.CreatePropertyOp(relProperty.FromEnd),
938
m_command
.CreateNode(
m_command
.CreateVarRefOp(unionAllVars[0])));
939
Node predicate =
m_command
.BuildComparison(OpType.EQ,
941
Node filterNode =
m_command
.CreateNode(
m_command
.CreateFilterOp(),
947
Node projectNode =
m_command
.BuildProject(filterNode, new Var[] { unionAllVars[1] }, new Node[] { });
952
ret =
m_command
.BuildCollect(projectNode, unionAllVars[1]);
976
PlanCompiler.Assert(
m_command
.IsRelPropertyReferenced(relProperty) || (relProperty.ToEnd.RelationshipMultiplicity == RelationshipMultiplicity.Many),
996
return
m_command
.CreateNode(
m_command
.CreateNewMultisetOp(resultType));
998
return
m_command
.CreateNode(
m_command
.CreateNullOp(resultType));
1002
Node sourceRefNode =
m_command
.CreateNode(
1003
m_command
.CreateGetEntityRefOp(relProperty.FromEnd.TypeUsage),
1126
if (!
m_command
.MetadataWorkspace.TryGetFunctionImportMapping(op.Function, out functionImportMapping))
1143
Node ret = functionImportMappingComposable.GetInternalTree(
m_command
, n.Children);
1437
foreach (EdmType subType in MetadataHelper.GetTypeAndSubtypesOf(testType,
m_command
.MetadataWorkspace, true /*includeAbstractTypes*/))
1468
ConditionalOp isNullOp =
m_command
.CreateConditionalOp(OpType.IsNull);
1469
Node isNullNode =
m_command
.CreateNode(isNullOp, n.Child0);
1475
ConditionalOp notOp =
m_command
.CreateConditionalOp(OpType.Not);
1476
Node notNode =
m_command
.CreateNode(notOp, isNullNode);
1479
ConstantBaseOp trueOp =
m_command
.CreateConstantOp(op.Type, true);
1480
Node trueNode =
m_command
.CreateNode(trueOp);
1483
NullOp nullOp =
m_command
.CreateNullOp(op.Type);
1484
Node nullNode =
m_command
.CreateNode(nullOp);
1487
CaseOp caseOp =
m_command
.CreateCaseOp(op.Type);
1488
Node caseNode =
m_command
.CreateNode(caseOp, notNode, trueNode, nullNode);
1491
ComparisonOp equalsOp =
m_command
.CreateComparisonOp(OpType.EQ);
1492
Node equalsNode =
m_command
.CreateNode(equalsOp, caseNode, trueNode);
1616
NewRecordOp keyOp =
m_command
.CreateNewRecordOp(keyExprType);
1617
Node keyNode =
m_command
.CreateNode(keyOp, keyFields);
1650
keyExpr = OpCopier.Copy(
m_command
, keyExpr);
1659
return
m_command
.CreateNode(
m_command
.CreateNullOp(relProperty.ToEnd.TypeUsage));
1662
ScanTableOp scanTableOp =
m_command
.CreateScanTableOp(Command.CreateTableDefinition(relSet));
1666
Node scanNode =
m_command
.CreateNode(scanTableOp);
1668
Node sourceEndNode =
m_command
.CreateNode(
1669
m_command
.CreatePropertyOp(relProperty.FromEnd),
1670
m_command
.CreateNode(
m_command
.CreateVarRefOp(scanTableVar)));
1671
Node predicateNode =
m_command
.BuildComparison(OpType.EQ,
1673
m_command
.CreateNode(
m_command
.CreateGetRefKeyOp(keyExpr.Op.Type), sourceEndNode));
1674
Node filterNode =
m_command
.CreateNode(
m_command
.CreateFilterOp(),
1686
ret =
m_command
.CreateNode(
1687
m_command
.CreatePropertyOp(relProperty.ToEnd),
1824
Op newEntityOp =
m_command
.CreateScopedNewEntityOp(op.Type, relProperties, scope);
1825
Node newNode =
m_command
.CreateNode(newEntityOp, newChildren);
1883
Op newEntityOp =
m_command
.CreateDiscriminatedNewEntityOp(op.Type, op.DiscriminatorMap, op.EntitySet, relProperties);
1884
Node newNode =
m_command
.CreateNode(newEntityOp, newChildren);
1934
Node singleRowTableNode =
m_command
.CreateNode(
m_command
.CreateSingleRowTableOp());
1935
Node filterNode =
m_command
.CreateNode(
m_command
.CreateFilterOp(),
1937
m_command
.CreateNode(
m_command
.CreateFalseOp()));
1938
Node fakeChild =
m_command
.CreateNode(
m_command
.CreateNullOp(collectionType.TypeUsage));
1940
Node projectNode =
m_command
.BuildProject(filterNode, fakeChild, out newVar);
1961
Node singleRowTableNode =
m_command
.CreateNode(
m_command
.CreateSingleRowTableOp());
1963
Node projectNode =
m_command
.BuildProject(singleRowTableNode, chi, out newVar);
1968
m_command
.BuildUnionAllLadder(inputNodes, inputVars, out resultNode, out resultVar);
1988
Node singleRowTableNode =
m_command
.CreateNode(
m_command
.CreateSingleRowTableOp());
1990
Node discriminatorNode =
m_command
.CreateNode(
m_command
.CreateInternalConstantOp(
m_command
.IntegerType, i));
1992
Node projectNode =
m_command
.BuildProject(singleRowTableNode, discriminatorNode, out newVar);
1998
m_command
.BuildUnionAllLadder(inputNodes, inputVars, out resultNode, out resultVar);
2007
ComparisonOp equalsOp =
m_command
.CreateComparisonOp(OpType.EQ);
2008
Node whenNode =
m_command
.CreateNode(equalsOp,
2009
m_command
.CreateNode(
m_command
.CreateVarRefOp(resultVar)),
2010
m_command
.CreateNode(
2011
m_command
.CreateConstantOp(
m_command
.IntegerType, i)));
2020
Node caseNode =
m_command
.CreateNode(
m_command
.CreateCaseOp(collectionType.TypeUsage), caseArgNodes);
2021
resultNode =
m_command
.BuildProject(resultNode, caseNode, out resultVar);
2026
PhysicalProjectOp physicalProjectOp =
m_command
.CreatePhysicalProjectOp(resultVar);
2027
Node physicalProjectNode =
m_command
.CreateNode(physicalProjectOp, resultNode);
2029
CollectOp collectOp =
m_command
.CreateCollectOp(op.Type);
2030
Node collectNode =
m_command
.CreateNode(collectOp, physicalProjectNode);
2372
return VisitNode(
m_command
.CreateNode(sort, sortChildren));
System\Data\Query\PlanCompiler\SubqueryTrackingVisitor.cs (12)
85
subquery =
m_command
.CreateNode(
m_command
.CreateVarRefOp(outputVar));
165
OuterApplyOp op =
m_command
.CreateOuterApplyOp();
166
newNode =
m_command
.CreateNode(op, newNode, subqueries[i]);
172
newNode =
m_command
.CreateNode(
m_command
.CreateCrossApplyOp(), newNode, input);
246
Node inputNode =
m_command
.CreateNode(
m_command
.CreateSingleRowTableOp());
248
Node filterNode =
m_command
.CreateNode(
m_command
.CreateFilterOp(), inputNode, joinCondition);
249
Node existsNode =
m_command
.CreateNode(
m_command
.CreateExistsOp(), filterNode);