1 write to _iqtCommand
System.Data.Entity (1)
System\Data\Query\PlanCompiler\ITreeGenerator.cs (1)
265
_iqtCommand
= new Command(ctree.MetadataWorkspace);
239 references to _iqtCommand
System.Data.Entity (239)
System\Data\Query\PlanCompiler\ITreeGenerator.cs (239)
257
return treeGenerator.
_iqtCommand
;
290
_iqtCommand
.CreateParameterVar(paramInfo.Key, paramInfo.Value);
294
_iqtCommand
.Root = VisitExpr(ctree.Query);
301
if (!
_iqtCommand
.Root.Op.IsRelOp)
303
Node scalarExpr = ConvertToScalarOpTree(
_iqtCommand
.Root, ctree.Query);
304
Node singletonTableNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateSingleRowTableOp());
306
Node varDefListNode =
_iqtCommand
.CreateVarDefListNode(scalarExpr, out newVar);
307
ProjectOp projectOp =
_iqtCommand
.CreateProjectOp(newVar);
310
Node newRoot =
_iqtCommand
.CreateNode(projectOp, singletonTableNode, varDefListNode);
312
if (TypeSemantics.IsCollectionType(
_iqtCommand
.Root.Op.Type))
314
UnnestOp unnestOp =
_iqtCommand
.CreateUnnestOp(newVar);
315
newRoot =
_iqtCommand
.CreateNode(unnestOp, varDefListNode.Child0);
319
_iqtCommand
.Root = newRoot;
320
_varMap[
_iqtCommand
.Root] = newVar;
328
_iqtCommand
.Root = CapWithPhysicalProject(
_iqtCommand
.Root);
511
CollectOp collectOp =
_iqtCommand
.CreateCollectOp(resultType);
517
node =
_iqtCommand
.CreateNode(collectOp, projectNode);
527
CaseOp caseOp =
_iqtCommand
.CreateCaseOp(
_iqtCommand
.BooleanType);
536
arguments.Add(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateInternalConstantOp(
_iqtCommand
.BooleanType, true)));
542
arguments.Add(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateConditionalOp(OpType.Not), predCopy));
546
arguments.Add(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateInternalConstantOp(
_iqtCommand
.BooleanType, false)));
551
arguments.Add(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateNullOp(
_iqtCommand
.BooleanType)));
554
node =
_iqtCommand
.CreateNode(caseOp, arguments);
578
ComparisonOp comparisonOp =
_iqtCommand
.CreateComparisonOp(OpType.EQ);
579
Node trueNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateInternalConstantOp(
_iqtCommand
.BooleanType, true));
580
node =
_iqtCommand
.CreateNode(comparisonOp, node, trueNode);
618
return
_iqtCommand
.CreateNode(op, exprDelegate(e.Argument));
623
return
_iqtCommand
.CreateNode(op, exprDelegate(e.Left), exprDelegate(e.Right));
685
Node varDefNode =
_iqtCommand
.CreateVarDefNode(inputNode, out inputCollectionVar);
691
UnnestOp unnest =
_iqtCommand
.CreateUnnestOp(inputCollectionVar);
698
Node unnestNode =
_iqtCommand
.CreateNode(unnest, varDefNode);
708
Node varRefNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarRefOp(unnest.Table.Columns[0]));
709
Node varDefListNode =
_iqtCommand
.CreateVarDefListNode(varRefNode, out projectVar);
711
ProjectOp projectOp =
_iqtCommand
.CreateProjectOp(projectVar);
712
Node projectNode =
_iqtCommand
.CreateNode(projectOp, unnestNode, varDefListNode);
735
ProjectOp projectOp =
_iqtCommand
.CreateProjectOp(inputVar);
736
Node projectNode =
_iqtCommand
.CreateNode(projectOp, input,
737
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarDefListOp()));
755
PhysicalProjectOp projectOp =
_iqtCommand
.CreatePhysicalProjectOp(inputVar);
756
Node projectNode =
_iqtCommand
.CreateNode(projectOp, input);
836
_varScopes.Push(new ExpressionBindingScope(
_iqtCommand
, bindingName, boundVar));
906
_varScopes.Push(new LambdaScope(this,
_iqtCommand
, args));
948
recordColumns.Add(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarRefOp(colVar)));
954
Node newRecordNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateNewRecordOp(recType), recordColumns);
960
Node varDefNode =
_iqtCommand
.CreateVarDefListNode(newRecordNode, out newRecordVar);
965
ProjectOp projection =
_iqtCommand
.CreateProjectOp(newRecordVar);
966
Node projectionNode =
_iqtCommand
.CreateNode(projection, inputNode, varDefNode);
988
ConstantBaseOp op =
_iqtCommand
.CreateConstantOp(e.ResultType, e.GetValue());
989
return
_iqtCommand
.CreateNode(op);
994
NullOp op =
_iqtCommand
.CreateNullOp(e.ResultType);
995
return
_iqtCommand
.CreateNode(op);
1029
Op op =
_iqtCommand
.CreateVarRefOp(
_iqtCommand
.GetParameter(e.ParameterName));
1030
return
_iqtCommand
.CreateNode(op);
1048
lambda =
_iqtCommand
.MetadataWorkspace.GetGeneratedFunctionDefinition(e.Function);
1073
retNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateFunctionOp(e.Function), argNodes);
1150
Node varRefNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarRefOp(nodeVar));
1151
Node castNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateSoftCastOp(targetType), varRefNode);
1152
Node varDefListNode =
_iqtCommand
.CreateVarDefListNode(castNode, out projectVar);
1154
ProjectOp projectOp =
_iqtCommand
.CreateProjectOp(projectVar);
1155
Node projectNode =
_iqtCommand
.CreateNode(projectOp, node, varDefListNode);
1169
SoftCastOp castOp =
_iqtCommand
.CreateSoftCastOp(targetType);
1170
return
_iqtCommand
.CreateNode(castOp, node);
1190
return
_iqtCommand
.CreateNode(
_iqtCommand
.CreateGetEntityRefOp(refType), arg);
1297
Op op =
_iqtCommand
.CreatePropertyOp(e.Property);
1301
retNode =
_iqtCommand
.CreateNode(op, instance);
1310
Op op =
_iqtCommand
.CreateComparisonOp(s_opMap[e.ExpressionKind]);
1332
return
_iqtCommand
.CreateNode(op, leftArg, rightArg);
1337
return
_iqtCommand
.CreateNode(
1338
_iqtCommand
.CreateLikeOp(),
1386
_iqtCommand
.CreateNode(
1387
_iqtCommand
.CreateConstrainedSortOp(((SortOp)inputNode.Op).Keys, withTies),
1389
_iqtCommand
.CreateNode(
_iqtCommand
.CreateNullOp(
_iqtCommand
.IntegerType)),
1404
_iqtCommand
.CreateNode(
1405
_iqtCommand
.CreateConstrainedSortOp(new List<SortKey>(), withTies),
1407
_iqtCommand
.CreateNode(
_iqtCommand
.CreateNullOp(
_iqtCommand
.IntegerType)),
1487
Op op =
_iqtCommand
.CreateConditionalOp(OpType.IsNull);
1493
return
_iqtCommand
.CreateNode(op,
_iqtCommand
.CreateNode(
_iqtCommand
.CreateInternalConstantOp(
_iqtCommand
.BooleanType, true)));
1502
return
_iqtCommand
.CreateNode(op, argNode);
1507
Op op =
_iqtCommand
.CreateArithmeticOp(s_opMap[e.ExpressionKind], e.ResultType);
1516
return
_iqtCommand
.CreateNode(op, children);
1521
Op op =
_iqtCommand
.CreateConditionalOp(OpType.And);
1527
Op op =
_iqtCommand
.CreateConditionalOp(OpType.Or);
1533
Op op =
_iqtCommand
.CreateConditionalOp(OpType.Not);
1541
Op distinctOp =
_iqtCommand
.CreateDistinctOp(inputVar);
1542
Node distinctNode =
_iqtCommand
.CreateNode(distinctOp, inputSetNode);
1549
Op elementOp =
_iqtCommand
.CreateElementOp(e.ResultType);
1561
inputSetNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateSingleRowOp(), inputSetNode);
1566
return
_iqtCommand
.CreateNode(elementOp, inputSetNode);
1574
Op existsOp =
_iqtCommand
.CreateExistsOp();
1577
return
_iqtCommand
.CreateNode(
1578
_iqtCommand
.CreateConditionalOp(OpType.Not),
1579
_iqtCommand
.CreateNode(existsOp, inputSetNode)
1610
Var outputVar =
_iqtCommand
.CreateSetOpVar(TypeHelpers.GetEdmType<CollectionType>(expression.ResultType).TypeUsage);
1624
setOp =
_iqtCommand
.CreateExceptOp(leftMap, rightMap);
1628
setOp =
_iqtCommand
.CreateIntersectOp(leftMap, rightMap);
1632
setOp =
_iqtCommand
.CreateUnionAllOp(leftMap, rightMap);
1637
Node setOpNode =
_iqtCommand
.CreateNode(setOp, leftNode, rightNode);
1666
op =
_iqtCommand
.CreateFakeTreatOp(e.ResultType);
1670
op =
_iqtCommand
.CreateTreatOp(e.ResultType);
1680
op =
_iqtCommand
.CreateIsOfOnlyOp(e.OfType);
1684
op =
_iqtCommand
.CreateIsOfOp(e.OfType);
1691
Op op =
_iqtCommand
.CreateCastOp(e.ResultType);
1707
return
_iqtCommand
.CreateNode(
_iqtCommand
.CreateCaseOp(e.ResultType), childNodes);
2024
Node resultNode =
_iqtCommand
.BuildFakeTreatProject(inputNode, inputVar, e.OfType, out resultVar);
2039
newInstOp =
_iqtCommand
.CreateNewMultisetOp(e.ResultType);
2043
newInstOp =
_iqtCommand
.CreateNewRecordOp(e.ResultType);
2059
newInstOp =
_iqtCommand
.CreateNewEntityOp(e.ResultType, relPropertyList);
2063
newInstOp =
_iqtCommand
.CreateNewInstanceOp(e.ResultType);
2097
Node node =
_iqtCommand
.CreateNode(newInstOp, newArgs);
2110
Op op =
_iqtCommand
.CreateRefOp(e.EntitySet, e.ResultType);
2112
return
_iqtCommand
.CreateNode(op, newArg);
2118
Op op =
_iqtCommand
.CreateNavigateOp(e.ResultType, relProperty);
2120
return
_iqtCommand
.CreateNode(op, arg);
2125
Op op =
_iqtCommand
.CreateDerefOp(e.ResultType);
2131
Op op =
_iqtCommand
.CreateGetRefKeyOp(e.ResultType);
2137
Op op =
_iqtCommand
.CreateGetEntityRefOp(e.ResultType);
2147
ScanTableOp op =
_iqtCommand
.CreateScanTableOp(tableMetadata);
2150
Node node =
_iqtCommand
.CreateNode(op);
2168
Op filtOp =
_iqtCommand
.CreateFilterOp();
2171
Node filtNode =
_iqtCommand
.CreateNode(filtOp, inputSetNode, predicateNode);
2213
DiscriminatedNewEntityOp newInstOp =
_iqtCommand
.CreateDiscriminatedNewEntityOp(e.Projection.ResultType,
2228
Node newInstNode =
_iqtCommand
.CreateNode(newInstOp, newArgs);
2232
Node varDefListNode =
_iqtCommand
.CreateVarDefListNode(newInstNode, out sourceVar);
2234
ProjectOp projOp =
_iqtCommand
.CreateProjectOp(sourceVar);
2235
Node projNode =
_iqtCommand
.CreateNode(projOp, source, varDefListNode);
2254
Node varDefListNode =
_iqtCommand
.CreateVarDefListNode(projectionNode, out projectionVar);
2256
ProjectOp projOp =
_iqtCommand
.CreateProjectOp(projectionVar);
2257
Node projNode =
_iqtCommand
.CreateNode(projOp, projectedSetNode, varDefListNode);
2338
joinOp =
_iqtCommand
.CreateCrossJoinOp();
2344
joinOp =
_iqtCommand
.CreateInnerJoinOp();
2350
joinOp =
_iqtCommand
.CreateLeftOuterJoinOp();
2356
joinOp =
_iqtCommand
.CreateFullOuterJoinOp();
2379
_iqtCommand
.CreateNode(joinOp, inputNodes),
2424
applyOp =
_iqtCommand
.CreateCrossApplyOp();
2428
applyOp =
_iqtCommand
.CreateOuterApplyOp();
2431
Node retNode =
_iqtCommand
.CreateNode(applyOp, inputNode, applyNode);
2453
VarVec keyVarSet =
_iqtCommand
.CreateVarVec();
2454
VarVec outputVarSet =
_iqtCommand
.CreateVarVec();
2476
VarVec copyOutputVarSet =
_iqtCommand
.CreateVarVec();
2477
VarVec copyKeyVarSet =
_iqtCommand
.CreateVarVec();
2487
scope = new ExpressionBindingScope(
_iqtCommand
, e.Input.GroupVariableName, scope.ScopeVar);
2543
_iqtCommand
.CreateNode(
2544
_iqtCommand
.CreateVarDefListOp(),
2548
_iqtCommand
.CreateNode(
2549
_iqtCommand
.CreateVarDefListOp(),
2557
_iqtCommand
.CreateNode(
2558
_iqtCommand
.CreateVarDefListOp(),
2561
op =
_iqtCommand
.CreateGroupByIntoOp(keyVarSet, this.
_iqtCommand
.CreateVarVec(_varMap[inputNode]), outputVarSet);
2565
op =
_iqtCommand
.CreateGroupByOp(keyVarSet, outputVarSet);
2568
Node groupByNode =
_iqtCommand
.CreateNode(
2612
keyVarDefNodes.Add(
_iqtCommand
.CreateVarDefNode(keyNode, out keyVar));
2629
Node aggNode =
_iqtCommand
.CreateNode(
2630
_iqtCommand
.CreateAggregateOp(funcAgg.Function, funcAgg.Distinct),
2637
return
_iqtCommand
.CreateVarDefNode(aggNode, out aggVar);
2676
VarVec projectOutpus =
_iqtCommand
.CreateVarVec();
2680
Node projectNodeWithKeys =
_iqtCommand
.CreateNode(
2681
_iqtCommand
.CreateProjectOp(projectOutpus),
2683
_iqtCommand
.CreateNode( //the key var defs
2684
_iqtCommand
.CreateVarDefListOp(),
2705
FlattenProperties(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarRefOp(keyVar)), flattentedKeys);
2706
FlattenProperties(
_iqtCommand
.CreateNode(
_iqtCommand
.CreateVarRefOp(copyOfKeyVar)), copyFlattenedKeys);
2722
Node predicate =
_iqtCommand
.CreateNode(
2723
_iqtCommand
.CreateConditionalOp(OpType.Or),
2724
_iqtCommand
.CreateNode(
2725
_iqtCommand
.CreateComparisonOp(OpType.EQ), keyNode, copyKeyNode),
2726
_iqtCommand
.CreateNode(
2727
_iqtCommand
.CreateConditionalOp(OpType.And),
2728
_iqtCommand
.CreateNode(
2729
_iqtCommand
.CreateConditionalOp(OpType.IsNull),
2730
OpCopier.Copy(
_iqtCommand
, keyNode)),
2731
_iqtCommand
.CreateNode(
2732
_iqtCommand
.CreateConditionalOp(OpType.IsNull),
2733
OpCopier.Copy(
_iqtCommand
, copyKeyNode))));
2741
filterPredicateNode =
_iqtCommand
.CreateNode(
2742
_iqtCommand
.CreateConditionalOp(OpType.And),
2747
Node filterNode =
_iqtCommand
.CreateNode(
2748
_iqtCommand
.CreateFilterOp(), projectNodeWithKeys, filterPredicateNode);
2757
Node result =
_iqtCommand
.CreateVarDefNode(groupDefNode, out groupAggVar);
2776
Node newInput = (i == 0) ? input : OpCopier.Copy(
_iqtCommand
, input);
2777
FlattenProperties(
_iqtCommand
.CreateNode(
_iqtCommand
.CreatePropertyOp(properties[i]), newInput), flattenedProperties);
2819
VarVec projectedVars =
_iqtCommand
.CreateVarVec();
2850
sortVarDefs.Add(
_iqtCommand
.CreateVarDefNode(exprNode, out specVar));
2878
_iqtCommand
.CreateNode(
2879
_iqtCommand
.CreateProjectOp(projectedVars),
2881
_iqtCommand
.CreateNode(
2882
_iqtCommand
.CreateVarDefListOp(),
2912
_iqtCommand
.CreateNode(
2913
_iqtCommand
.CreateConstrainedSortOp(sortKeys),
2916
_iqtCommand
.CreateNode(
_iqtCommand
.CreateNullOp(
_iqtCommand
.IntegerType))
2938
SortOp newSortOp =
_iqtCommand
.CreateSortOp(sortKeys);
2943
Node newSortNode =
_iqtCommand
.CreateNode(newSortOp, inputNode);
2982
predicateNode =
_iqtCommand
.CreateNode(
2983
_iqtCommand
.CreateConditionalOp(OpType.Not),
2992
predicateCopy =
_iqtCommand
.CreateNode(
2993
_iqtCommand
.CreateConditionalOp(OpType.IsNull),
2998
predicateNode =
_iqtCommand
.CreateNode(
2999
_iqtCommand
.CreateConditionalOp(OpType.Or),
3014
inputNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateFilterOp(), inputNode, predicateNode);
3020
retNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateExistsOp(), inputNode);
3027
retNode =
_iqtCommand
.CreateNode(
_iqtCommand
.CreateConditionalOp(OpType.Not), retNode);