632 references to DbExpressionKind
System.Data.Entity (632)
System\Data\Common\CommandTrees\AbstractExpressions.cs (9)
333
private readonly
DbExpressionKind
_kind;
335
internal DbExpression(
DbExpressionKind
kind, TypeUsage type)
357
public
DbExpressionKind
ExpressionKind { get { return _kind; } }
714
internal static void CheckExpressionKind(
DbExpressionKind
kind)
718
if ((kind <
DbExpressionKind
.All) || (
DbExpressionKind
.Lambda < kind))
720
throw EntityUtil.InvalidEnumerationValue(typeof(
DbExpressionKind
), (int)kind);
736
internal DbBinaryExpression(
DbExpressionKind
kind, TypeUsage type, DbExpression left, DbExpression right)
765
internal DbUnaryExpression(
DbExpressionKind
kind, TypeUsage resultType, DbExpression argument)
System\Data\Common\CommandTrees\DefaultExpressionVisitor.cs (21)
475
case
DbExpressionKind
.Equals:
478
case
DbExpressionKind
.NotEquals:
481
case
DbExpressionKind
.GreaterThan:
484
case
DbExpressionKind
.GreaterThanOrEquals:
487
case
DbExpressionKind
.LessThan:
490
case
DbExpressionKind
.LessThanOrEquals:
566
case
DbExpressionKind
.Divide:
570
case
DbExpressionKind
.Minus:
574
case
DbExpressionKind
.Modulo:
578
case
DbExpressionKind
.Multiply:
582
case
DbExpressionKind
.Plus:
586
case
DbExpressionKind
.UnaryMinus:
683
if (expression.ExpressionKind ==
DbExpressionKind
.IsOfOnly)
724
if (expression.ExpressionKind ==
DbExpressionKind
.OfTypeOnly)
908
if (
DbExpressionKind
.InnerJoin == expression.ExpressionKind)
912
else if (
DbExpressionKind
.LeftOuterJoin == expression.ExpressionKind)
918
Debug.Assert(expression.ExpressionKind ==
DbExpressionKind
.FullOuterJoin, "DbJoinExpression had ExpressionKind other than InnerJoin, LeftOuterJoin or FullOuterJoin?");
939
if (
DbExpressionKind
.CrossApply == expression.ExpressionKind)
945
Debug.Assert(expression.ExpressionKind ==
DbExpressionKind
.OuterApply, "DbApplyExpression had ExpressionKind other than CrossApply or OuterApply?");
1036
if (
DbExpressionKind
.All == expression.ExpressionKind)
1042
Debug.Assert(expression.ExpressionKind ==
DbExpressionKind
.Any, "DbQuantifierExpression had ExpressionKind other than All or Any?");
System\Data\Common\CommandTrees\ExpressionBuilder\DbExpressionBuilder.cs (66)
310
return new DbQuantifierExpression(
DbExpressionKind
.All, booleanResultType, input, predicate);
326
return new DbQuantifierExpression(
DbExpressionKind
.Any, booleanResultType, input, predicate);
335
/// <returns>An new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of CrossApply.</returns>
340
return new DbApplyExpression(
DbExpressionKind
.CrossApply, resultType, input, apply);
349
/// <returns>An new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of OuterApply.</returns>
354
return new DbApplyExpression(
DbExpressionKind
.OuterApply, resultType, input, apply);
361
/// <returns>A new DbCrossJoinExpression, with an <see cref="
DbExpressionKind
"/> of CrossJoin, that represents the unconditional join of the input sets.</returns>
375
/// expression bindings, on the specified join condition, using InnerJoin as the <see cref="
DbExpressionKind
"/>.
381
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of InnerJoin, that represents the inner join operation applied to the left and right
393
return new DbJoinExpression(
DbExpressionKind
.InnerJoin, resultType, left, right, joinCondition);
398
/// expression bindings, on the specified join condition, using LeftOuterJoin as the <see cref="
DbExpressionKind
"/>.
404
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of LeftOuterJoin, that represents the left outer join operation applied to the left and right
416
return new DbJoinExpression(
DbExpressionKind
.LeftOuterJoin, resultType, left, right, joinCondition);
421
/// expression bindings, on the specified join condition, using FullOuterJoin as the <see cref="
DbExpressionKind
"/>.
427
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of FullOuterJoin, that represents the full outer join operation applied to the left and right
439
return new DbJoinExpression(
DbExpressionKind
.FullOuterJoin, resultType, left, right, joinCondition);
728
private static DbArithmeticExpression CreateArithmetic(
DbExpressionKind
kind, DbExpression left, DbExpression right)
747
return CreateArithmetic(
DbExpressionKind
.Divide, left, right);
762
return CreateArithmetic(
DbExpressionKind
.Minus, left, right);
777
return CreateArithmetic(
DbExpressionKind
.Modulo, left, right);
792
return CreateArithmetic(
DbExpressionKind
.Multiply, left, right);
807
return CreateArithmetic(
DbExpressionKind
.Plus, left, right);
823
return new DbArithmeticExpression(
DbExpressionKind
.UnaryMinus, resultType, args);
844
private static DbComparisonExpression CreateComparison(
DbExpressionKind
kind, DbExpression left, DbExpression right)
862
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.Equals, left, right);
877
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.NotEquals, left, right);
892
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.GreaterThan, left, right);
907
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.LessThan, left, right);
922
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.GreaterThanOrEquals, left, right);
937
return DbExpressionBuilder.CreateComparison(
DbExpressionKind
.LessThanOrEquals, left, right);
1025
/// <returns>A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of <see cref="
DbExpressionKind
.OfType"/>.</returns>
1039
return new DbOfTypeExpression(
DbExpressionKind
.OfType, collectionOfTypeResultType, argument, type);
1047
/// <returns>A new DbOfTypeExpression with the specified set argument and type, and an ExpressionKind of <see cref="
DbExpressionKind
.OfTypeOnly"/>.</returns>
1061
return new DbOfTypeExpression(
DbExpressionKind
.OfTypeOnly, collectionOfTypeResultType, argument, type);
1081
return new DbIsOfExpression(
DbExpressionKind
.IsOf, booleanResultType, argument, type);
1101
return new DbIsOfExpression(
DbExpressionKind
.IsOfOnly, booleanResultType, argument, type);
1999
/// <returns>An new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of CrossApply.</returns>
2022
/// <returns>An new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of OuterApply.</returns>
2039
/// on the specified join condition, using FullOuterJoin as the <see cref="
DbExpressionKind
"/>.
2049
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of FullOuterJoin, that represents the full outer join operation
2073
/// on the specified join condition, using InnerJoin as the <see cref="
DbExpressionKind
"/>.
2083
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of InnerJoin, that represents the inner join operation
2107
/// on the specified join condition, using LeftOuterJoin as the <see cref="
DbExpressionKind
"/>.
2117
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of LeftOuterJoin, that represents the left outer join operation
2141
/// on an equality condition between the specified outer and inner keys, using InnerJoin as the <see cref="
DbExpressionKind
"/>.
2148
/// A new DbJoinExpression, with an <see cref="
DbExpressionKind
"/> of InnerJoin, that represents the inner join operation
2178
/// expressions, joined on an equality condition between the specified outer and inner keys, using InnerJoin as the <see cref="
DbExpressionKind
"/>.
2192
/// The input DbJoinExpression is created with an <see cref="
DbExpressionKind
"/> of InnerJoin, that represents the inner join operation
2388
/// <returns>An new DbProjectExpression that selects the apply column from a new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of CrossApply.</returns>
2422
/// <returns>An new DbProjectExpression that selects the result of the given selector from a new DbApplyExpression with the specified input and apply bindings and an <see cref="
DbExpressionKind
"/> of CrossApply.</returns>
2702
internal static DbApplyExpression CreateApplyExpressionByKind(
DbExpressionKind
applyKind, DbExpressionBinding input, DbExpressionBinding apply)
2704
Debug.Assert(
DbExpressionKind
.CrossApply == applyKind ||
DbExpressionKind
.OuterApply == applyKind, "Invalid ApplyType");
2708
case
DbExpressionKind
.CrossApply:
2711
case
DbExpressionKind
.OuterApply:
2715
throw EntityUtil.InvalidEnumerationValue(typeof(
DbExpressionKind
), (int)applyKind);
2719
internal static DbExpression CreateJoinExpressionByKind(
DbExpressionKind
joinKind, DbExpression joinCondition, DbExpressionBinding input1, DbExpressionBinding input2)
2721
Debug.Assert(
DbExpressionKind
.CrossJoin == joinKind ||
2722
DbExpressionKind
.FullOuterJoin == joinKind ||
2723
DbExpressionKind
.InnerJoin == joinKind ||
2724
DbExpressionKind
.LeftOuterJoin == joinKind,
2727
if (
DbExpressionKind
.CrossJoin == joinKind)
2738
case
DbExpressionKind
.InnerJoin:
2741
case
DbExpressionKind
.LeftOuterJoin:
2744
case
DbExpressionKind
.FullOuterJoin:
2748
throw EntityUtil.InvalidEnumerationValue(typeof(
DbExpressionKind
), (int)joinKind);
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (10)
696
if (count.ExpressionKind !=
DbExpressionKind
.Constant &&
697
count.ExpressionKind !=
DbExpressionKind
.ParameterReference)
911
internal static TypeUsage ValidateComparison(
DbExpressionKind
kind, DbExpression left, DbExpression right)
921
if (
DbExpressionKind
.GreaterThanOrEquals == kind ||
922
DbExpressionKind
.LessThanOrEquals == kind)
927
else if (
DbExpressionKind
.Equals == kind ||
928
DbExpressionKind
.NotEquals == kind)
1387
if (limit.ExpressionKind !=
DbExpressionKind
.Constant &&
1388
limit.ExpressionKind !=
DbExpressionKind
.ParameterReference)
2056
return (expression.ExpressionKind ==
DbExpressionKind
.Constant &&
System\Data\Common\CommandTrees\Internal\ExpressionDumper.cs (1)
359
attrs.Add("DbExpressionKind", Enum.GetName(typeof(
DbExpressionKind
), expr.ExpressionKind));
System\Data\Common\CommandTrees\Internal\ExpressionKeyGen.cs (20)
62
var names = Enum.GetNames(typeof(
DbExpressionKind
));
65
names[(int)
DbExpressionKind
.Divide] = "/";
66
names[(int)
DbExpressionKind
.Modulo] = "%";
67
names[(int)
DbExpressionKind
.Multiply] = "*";
68
names[(int)
DbExpressionKind
.Plus] = "+";
69
names[(int)
DbExpressionKind
.Minus] = "-";
70
names[(int)
DbExpressionKind
.UnaryMinus] = "-";
73
names[(int)
DbExpressionKind
.Equals] = "=";
74
names[(int)
DbExpressionKind
.LessThan] = "<";
75
names[(int)
DbExpressionKind
.LessThanOrEquals] = "<=";
76
names[(int)
DbExpressionKind
.GreaterThan] = ">";
77
names[(int)
DbExpressionKind
.GreaterThanOrEquals] = ">=";
78
names[(int)
DbExpressionKind
.NotEquals] = "<>";
80
names[(int)
DbExpressionKind
.Property] = ".";
83
names[(int)
DbExpressionKind
.InnerJoin] = "IJ";
84
names[(int)
DbExpressionKind
.FullOuterJoin] = "FOJ";
85
names[(int)
DbExpressionKind
.LeftOuterJoin] = "LOJ";
86
names[(int)
DbExpressionKind
.CrossApply] = "CA";
87
names[(int)
DbExpressionKind
.OuterApply] = "OA";
147
private void VisitExprKind(
DbExpressionKind
kind)
System\Data\Common\CommandTrees\Internal\ExpressionPrinter.cs (22)
214
private static Dictionary<
DbExpressionKind
, string> _opMap = InitializeOpMap();
216
private static Dictionary<
DbExpressionKind
, string> InitializeOpMap()
218
Dictionary<
DbExpressionKind
, string> opMap = new Dictionary<
DbExpressionKind
, string>(12);
221
opMap[
DbExpressionKind
.Divide] = "/";
222
opMap[
DbExpressionKind
.Modulo] = "%";
223
opMap[
DbExpressionKind
.Multiply] = "*";
224
opMap[
DbExpressionKind
.Plus] = "+";
225
opMap[
DbExpressionKind
.Minus] = "-";
226
opMap[
DbExpressionKind
.UnaryMinus] = "-";
229
opMap[
DbExpressionKind
.Equals] = "=";
230
opMap[
DbExpressionKind
.LessThan] = "<";
231
opMap[
DbExpressionKind
.LessThanOrEquals] = "<=";
232
opMap[
DbExpressionKind
.GreaterThan] = ">";
233
opMap[
DbExpressionKind
.GreaterThanOrEquals] = ">=";
234
opMap[
DbExpressionKind
.NotEquals] = "<>";
273
return new TreeNode(Enum.GetName(typeof(
DbExpressionKind
), expr.ExpressionKind));
572
if (e.Instance.ExpressionKind ==
DbExpressionKind
.VariableReference ||
573
(e.Instance.ExpressionKind ==
DbExpressionKind
.Property && 0 == inst.Children.Count))
621
if (
DbExpressionKind
.UnaryMinus == e.ExpressionKind)
713
if (
DbExpressionKind
.IsOfOnly == e.ExpressionKind)
730
TreeNode retInfo = new TreeNode(e.ExpressionKind ==
DbExpressionKind
.OfTypeOnly ? "OfTypeOnly" : "OfType");
System\Data\Common\CommandTrees\Internal\PatternMatchRules.cs (12)
121
/// Constructs a new pattern that is matched iff both <paramref name="pattern1"/> and <paramref name="pattern2"/> are matched. Does NOT return a pattern that matches <see cref="DbAndExpression"/>. Use <see cref="MatchKind"/> with an argument of <see cref="
DbExpressionKind
.And"/> to match an AND expression
129
/// Constructs a new pattern that is matched iff all of <paramref name="pattern1"/>, <paramref name="pattern2"/> and <paramref name="pattern3"/> are matched. Does NOT return a pattern that matches <see cref="DbAndExpression"/>. Use <see cref="MatchKind"/> with an argument of <see cref="
DbExpressionKind
.And"/> to match an AND expression
137
/// Constructs a new pattern that is matched if either <paramref name="pattern1"/> or <paramref name="pattern2"/> are matched. Does NOT return a pattern that matches <see cref="DbOrExpression"/>. Use <see cref="MatchKind"/> with an argument of <see cref="
DbExpressionKind
.Or"/> to match an OR expression
145
/// Constructs a new pattern that is matched if either <paramref name="pattern1"/>, <paramref name="pattern2"/> or <paramref name="pattern3"/> are matched. Does NOT return a pattern that matches <see cref="DbOrExpression"/>. Use <see cref="MatchKind"/> with an argument of <see cref="
DbExpressionKind
.Or"/> to match an OR expression
205
/// Constructs a new pattern that will match an expression with the specified <see cref="
DbExpressionKind
"/>.
207
internal static Func<DbExpression, bool> MatchKind(
DbExpressionKind
kindToMatch)
271
return (e => { if (e.ExpressionKind !=
DbExpressionKind
.Filter) { return false; } else { DbFilterExpression filterEx = (DbFilterExpression)e; return inputPattern(filterEx.Input.Expression) && predicatePattern(filterEx.Predicate); } });
279
return (e => { if (e.ExpressionKind !=
DbExpressionKind
.Project) { return false; } else { DbProjectExpression projectEx = (DbProjectExpression)e; return inputPattern(projectEx.Input.Expression) && projectionPattern(projectEx.Projection); } });
287
return (e => { if (e.ExpressionKind !=
DbExpressionKind
.Case) { return false; } else { DbCaseExpression caseEx = (DbCaseExpression)e; return whenPattern(caseEx.When) && thenPattern(caseEx.Then) && elsePattern(caseEx.Else); } });
291
/// Gets a pattern that is matched if the argument expression is a <see cref="DbCaseExpression"/>. This property can be used instead of repeated calls to <see cref="MatchKind"/> with an argument of <see cref="
DbExpressionKind
.Case"/>
293
internal static Func<DbExpression, bool> MatchNewInstance() { return (e => e.ExpressionKind ==
DbExpressionKind
.NewInstance); }
300
return (e => { if (e.ExpressionKind !=
DbExpressionKind
.NewInstance) { return false; } else { DbNewInstanceExpression newInst = (DbNewInstanceExpression)e; return argumentsPattern(newInst.Arguments); } });
System\Data\Common\CommandTrees\Internal\Validator.cs (2)
90
if(result.ExpressionKind ==
DbExpressionKind
.VariableReference)
120
if (result.ExpressionKind ==
DbExpressionKind
.ParameterReference)
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (27)
199
if (entityProject.Projection.ExpressionKind ==
DbExpressionKind
.Case)
342
Patterns.MatchKind(
DbExpressionKind
.Equals),
343
Patterns.MatchKind(
DbExpressionKind
.Or)
355
Patterns.MatchKind(
DbExpressionKind
.Property),
356
Patterns.MatchKind(
DbExpressionKind
.Case)
363
Patterns.MatchKind(
DbExpressionKind
.Property),
364
Patterns.MatchKind(
DbExpressionKind
.Or)
370
Patterns.MatchForAll(Patterns.MatchKind(
DbExpressionKind
.Property)),
371
Patterns.MatchForAll(Patterns.MatchKind(
DbExpressionKind
.NewInstance)),
372
Patterns.MatchKind(
DbExpressionKind
.NewInstance)
423
.Where(px => px.Instance.ExpressionKind ==
DbExpressionKind
.VariableReference &&
451
if(columnVal.ExpressionKind !=
DbExpressionKind
.Case)
458
casePredicate.Then[0].ExpressionKind !=
DbExpressionKind
.Constant || casePredicate.Else.ExpressionKind !=
DbExpressionKind
.Constant ||
539
if (expression.Instance.ExpressionKind ==
DbExpressionKind
.VariableReference &&
560
private static readonly Func<DbExpression, bool> Pattern_Case = Patterns.MatchKind(
DbExpressionKind
.Case);
592
if (predicate.ExpressionKind !=
DbExpressionKind
.Case) { return false; }
594
if (caseExpression.Then.Count != 1 && caseExpression.Then[0].ExpressionKind ==
DbExpressionKind
.Constant)
602
if (caseExpression.Else.ExpressionKind !=
DbExpressionKind
.Constant) { return false; }
621
Patterns.MatchKind(
DbExpressionKind
.NewInstance)
726
if (property.Instance.ExpressionKind ==
DbExpressionKind
.VariableReference &&
768
exp => (exp.ExpressionKind !=
DbExpressionKind
.Or),
807
if (expression.ExpressionKind !=
DbExpressionKind
.Equals) { return false; }
809
if (equals.Left.ExpressionKind !=
DbExpressionKind
.Property) { return false; }
814
if (property.Instance.ExpressionKind !=
DbExpressionKind
.VariableReference ||
822
if (expression.ExpressionKind ==
DbExpressionKind
.Constant)
827
if (expression.ExpressionKind ==
DbExpressionKind
.Cast &&
System\Data\Common\CommandTrees\OperatorExpressions.cs (41)
30
: base(
DbExpressionKind
.And, booleanResultType, left, right)
60
: base(
DbExpressionKind
.Or, booleanResultType, left, right)
90
: base(
DbExpressionKind
.Not, booleanResultType, argument)
122
internal DbArithmeticExpression(
DbExpressionKind
kind, TypeUsage numericResultType, DbExpressionList args)
128
DbExpressionKind
.Divide == kind ||
129
DbExpressionKind
.Minus == kind ||
130
DbExpressionKind
.Modulo == kind ||
131
DbExpressionKind
.Multiply == kind ||
132
DbExpressionKind
.Plus == kind ||
133
DbExpressionKind
.UnaryMinus == kind,
134
"Invalid DbExpressionKind used in DbArithmeticExpression: " + Enum.GetName(typeof(
DbExpressionKind
), kind)
140
(
DbExpressionKind
.UnaryMinus == kind && 1 == args.Count) ||
186
: base(
DbExpressionKind
.Case, commonResultType)
237
: base(
DbExpressionKind
.Cast, type, argument)
264
/// that is equality comparable (for <see cref="
DbExpressionKind
"/>.Equals and <see cref="
DbExpressionKind
"/>.NotEquals),
265
/// order comparable (for <see cref="
DbExpressionKind
"/>.GreaterThan and <see cref="
DbExpressionKind
"/>.LessThan),
266
/// or both (for <see cref="
DbExpressionKind
"/>.GreaterThanOrEquals and <see cref="
DbExpressionKind
"/>.LessThanOrEquals).
271
internal DbComparisonExpression(
DbExpressionKind
kind, TypeUsage booleanResultType, DbExpression left, DbExpression right)
278
DbExpressionKind
.Equals == kind ||
279
DbExpressionKind
.LessThan == kind ||
280
DbExpressionKind
.LessThanOrEquals == kind ||
281
DbExpressionKind
.GreaterThan == kind ||
282
DbExpressionKind
.GreaterThanOrEquals == kind ||
283
DbExpressionKind
.NotEquals == kind,
284
"Invalid DbExpressionKind used in DbComparisonExpression: " + Enum.GetName(typeof(
DbExpressionKind
), kind)
312
: base(
DbExpressionKind
.IsEmpty, booleanResultType, argument)
341
: base(
DbExpressionKind
.IsNull, booleanResultType, arg)
371
internal DbIsOfExpression(
DbExpressionKind
isOfKind, TypeUsage booleanResultType, DbExpression argument, TypeUsage isOfType)
374
Debug.Assert(
DbExpressionKind
.IsOf == this.ExpressionKind ||
DbExpressionKind
.IsOfOnly == this.ExpressionKind, string.Format(CultureInfo.InvariantCulture, "Invalid DbExpressionKind used in DbIsOfExpression: {0}", Enum.GetName(typeof(
DbExpressionKind
), this.ExpressionKind)));
413
internal DbOfTypeExpression(
DbExpressionKind
ofTypeKind, TypeUsage collectionResultType, DbExpression argument, TypeUsage type)
416
Debug.Assert(
DbExpressionKind
.OfType == ofTypeKind ||
417
DbExpressionKind
.OfTypeOnly == ofTypeKind,
458
: base(
DbExpressionKind
.Treat, asType, argument)
491
: base(
DbExpressionKind
.Like, booleanResultType)
545
: base(
DbExpressionKind
.EntityRef, refResultType, entity)
574
: base(
DbExpressionKind
.RefKey, rowResultType, reference)
System\Data\Common\CommandTrees\RelationalExpressions.cs (21)
30
internal DbApplyExpression(
DbExpressionKind
applyKind, TypeUsage resultRowCollectionTypeUsage, DbExpressionBinding input, DbExpressionBinding apply)
35
Debug.Assert(
DbExpressionKind
.CrossApply == applyKind ||
DbExpressionKind
.OuterApply == applyKind, "Invalid DbExpressionKind for DbApplyExpression");
79
: base(
DbExpressionKind
.Distinct, resultType, argument)
114
: base(
DbExpressionKind
.Element, resultType, argument)
120
: base(
DbExpressionKind
.Element, resultType, argument)
158
: base(
DbExpressionKind
.Except, resultType, left, right)
190
: base(
DbExpressionKind
.Filter, resultType)
241
: base(
DbExpressionKind
.GroupBy, collectionOfRowResultType)
295
: base(
DbExpressionKind
.Intersect, resultType, left, right)
325
: base(
DbExpressionKind
.CrossJoin, collectionOfRowResultType)
365
internal DbJoinExpression(
DbExpressionKind
joinKind, TypeUsage collectionOfRowResultType, DbExpressionBinding left, DbExpressionBinding right, DbExpression condition)
371
Debug.Assert(
DbExpressionKind
.InnerJoin == joinKind ||
372
DbExpressionKind
.LeftOuterJoin == joinKind ||
373
DbExpressionKind
.FullOuterJoin == joinKind,
424
: base(
DbExpressionKind
.Limit, resultType)
477
: base(
DbExpressionKind
.Project, resultType)
522
internal DbQuantifierExpression(
DbExpressionKind
kind, TypeUsage booleanResultType, DbExpressionBinding input, DbExpression predicate)
607
: base(
DbExpressionKind
.Skip, resultType)
664
: base(
DbExpressionKind
.Sort, resultType)
711
: base(
DbExpressionKind
.UnionAll, resultType, left, right)
System\Data\Common\CommandTrees\ValueExpressions.cs (12)
29
: base(
DbExpressionKind
.Constant, resultType)
107
: base(
DbExpressionKind
.Null, type)
137
: base(
DbExpressionKind
.VariableReference, type)
175
: base(
DbExpressionKind
.ParameterReference, type)
214
: base(
DbExpressionKind
.Property, resultType)
279
: base(
DbExpressionKind
.Function, resultType)
326
: base(
DbExpressionKind
.Lambda, resultType)
496
: base(
DbExpressionKind
.RelationshipNavigation, resultType)
639
: base(
DbExpressionKind
.NewInstance, type)
696
: base(
DbExpressionKind
.Ref, refResultType, refKeys)
732
: base(
DbExpressionKind
.Deref, entityResultType, refExpr)
763
: base(
DbExpressionKind
.Scan, collectionOfEntityType)
System\Data\Common\EntitySql\SemanticAnalyzer.cs (24)
2983
if (expr.ExpressionKind !=
DbExpressionKind
.Constant &&
2984
expr.ExpressionKind !=
DbExpressionKind
.ParameterReference)
3199
DbExpressionKind
joinKind = MapJoinKind(joinClause.JoinKind);
3207
if (
DbExpressionKind
.CrossJoin != joinKind)
3237
/// Maps <see cref="AST.JoinKind"/> to <see cref="
DbExpressionKind
"/>.
3239
private static
DbExpressionKind
MapJoinKind(AST.JoinKind joinKind)
3244
private static readonly
DbExpressionKind
[] joinMap = {
DbExpressionKind
.CrossJoin,
DbExpressionKind
.InnerJoin,
DbExpressionKind
.LeftOuterJoin,
DbExpressionKind
.FullOuterJoin };
3288
/// Maps <see cref="AST.ApplyKind"/> to <see cref="
DbExpressionKind
"/>.
3290
private static
DbExpressionKind
MapApplyKind(AST.ApplyKind applyKind)
3294
private static readonly
DbExpressionKind
[] applyMap = {
DbExpressionKind
.CrossApply,
DbExpressionKind
.OuterApply };
3615
converted = converted.ExpressionKind == CommandTrees.
DbExpressionKind
.Null ? converted : converted.ResultType.Null();
3952
if (lambdaBody.ExpressionKind !=
DbExpressionKind
.Project)
3965
if (projectExpression.Projection.ExpressionKind ==
DbExpressionKind
.VariableReference)
3970
else if (projectExpression.Projection.ExpressionKind ==
DbExpressionKind
.NewInstance &&
3985
if (projectionExpression.Arguments[i].ExpressionKind !=
DbExpressionKind
.Property)
4309
Debug.Assert(right.ExpressionKind ==
DbExpressionKind
.NewInstance, "right.ExpressionKind == DbExpressionKind.NewInstance");
4757
if (args.Right.ExpressionKind ==
DbExpressionKind
.NewInstance)
4792
if (args.Right.ExpressionKind ==
DbExpressionKind
.NewInstance)
System\Data\Mapping\Update\Internal\Propagator.cs (2)
139
if (
DbExpressionKind
.InnerJoin != node.ExpressionKind &&
DbExpressionKind
.LeftOuterJoin != node.ExpressionKind)
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (2)
190
if (
DbExpressionKind
.IsOfOnly != predicate.ExpressionKind)
219
if (
DbExpressionKind
.Equals == predicate.ExpressionKind)
System\Data\Mapping\Update\Internal\Propagator.JoinPropagator.cs (3)
64
Debug.Assert(
DbExpressionKind
.LeftOuterJoin == node.ExpressionKind ||
DbExpressionKind
.InnerJoin == node.ExpressionKind, "(Update/JoinPropagagtor/JoinEvaluator) " +
67
if (
DbExpressionKind
.InnerJoin == m_joinExpression.ExpressionKind)
System\Data\Mapping\Update\Internal\Propagator.JoinPropagator.JoinPredicateVisitor.cs (1)
124
if (
DbExpressionKind
.Equals == node.ExpressionKind)
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (1)
417
if (valueExpression.ExpressionKind ==
DbExpressionKind
.Null)
System\Data\Mapping\ViewGeneration\DiscriminatorMap.cs (8)
79
if (queryView.ExpressionKind !=
DbExpressionKind
.Project) { return false; }
82
if (project.Projection.ExpressionKind !=
DbExpressionKind
.Case) { return false; }
87
if (project.Input.Expression.ExpressionKind !=
DbExpressionKind
.Filter) { return false; }
189
if (then.ExpressionKind !=
DbExpressionKind
.NewInstance)
258
case
DbExpressionKind
.Property:
265
case
DbExpressionKind
.VariableReference:
268
case
DbExpressionKind
.NewInstance:
282
case
DbExpressionKind
.Ref:
System\Data\Mapping\ViewValidator.cs (28)
84
private void ValidateExpressionKind(
DbExpressionKind
expressionKind)
89
case
DbExpressionKind
.Constant:
90
case
DbExpressionKind
.Property:
91
case
DbExpressionKind
.Null:
92
case
DbExpressionKind
.VariableReference:
93
case
DbExpressionKind
.Cast:
94
case
DbExpressionKind
.Case:
95
case
DbExpressionKind
.Not:
96
case
DbExpressionKind
.Or:
97
case
DbExpressionKind
.And:
98
case
DbExpressionKind
.IsNull:
99
case
DbExpressionKind
.Equals:
100
case
DbExpressionKind
.NotEquals:
101
case
DbExpressionKind
.LessThan:
102
case
DbExpressionKind
.LessThanOrEquals:
103
case
DbExpressionKind
.GreaterThan:
104
case
DbExpressionKind
.GreaterThanOrEquals:
105
case
DbExpressionKind
.Project:
106
case
DbExpressionKind
.NewInstance:
107
case
DbExpressionKind
.Filter:
108
case
DbExpressionKind
.Ref:
109
case
DbExpressionKind
.UnionAll:
110
case
DbExpressionKind
.Scan:
111
case
DbExpressionKind
.FullOuterJoin:
112
case
DbExpressionKind
.LeftOuterJoin:
113
case
DbExpressionKind
.InnerJoin:
114
case
DbExpressionKind
.EntityRef:
115
case
DbExpressionKind
.Function:
System\Data\Objects\ELinq\ExpressionConverter.cs (11)
491
if (projection.ExpressionKind ==
DbExpressionKind
.VariableReference &&
849
if (input.ExpressionKind ==
DbExpressionKind
.Project && !TryGetSpan(input, out span))
1251
case
DbExpressionKind
.Constant:
1254
case
DbExpressionKind
.Constant: // constant EQ constant
1256
case
DbExpressionKind
.Null: // null EQ constant --> false
1261
case
DbExpressionKind
.Null:
1264
case
DbExpressionKind
.Constant: // null EQ constant --> false
1266
case
DbExpressionKind
.Null: // null EQ null --> true
1274
case
DbExpressionKind
.Constant:
1276
case
DbExpressionKind
.Null: // left EQ null --> left IS NULL
1374
if (providerSupportsEscapingLikeArgument && translatedPatternExpression.ExpressionKind ==
DbExpressionKind
.Constant)
System\Data\Objects\ELinq\MethodCallTranslator.cs (25)
443
if (arg.ExpressionKind ==
DbExpressionKind
.Constant)
897
case
DbExpressionKind
.Constant:
900
case
DbExpressionKind
.ParameterReference:
903
case
DbExpressionKind
.Null:
1193
if (argument.ExpressionKind !=
DbExpressionKind
.Constant ||
1626
return new DbJoinExpression(
DbExpressionKind
.InnerJoin, TypeUsage.Create(TypeHelpers.CreateCollectionType(resultType)), outerBinding, innerBinding, joinCondition);
2188
bool requireSentinel = !(null == defaultValue || defaultValue.ExpressionKind ==
DbExpressionKind
.Null);
2247
if (source.ExpressionKind ==
DbExpressionKind
.NewInstance)
2259
IEnumerable<DbExpression> constantArguments = arguments.Where(argument => argument.ExpressionKind ==
DbExpressionKind
.Constant);
2267
IEnumerable<DbExpression> otherArguments = arguments.Where(argument => argument.ExpressionKind !=
DbExpressionKind
.Constant);
2548
return new DbApplyExpression(
DbExpressionKind
.OuterApply, TypeUsage.Create(TypeHelpers.CreateCollectionType(resultType)), newInput, newApply);
2611
if (cqtExpression.ExpressionKind !=
DbExpressionKind
.CrossApply)
2625
if (crossApply.Apply.Expression.ExpressionKind !=
DbExpressionKind
.Project)
2632
if (rightProject.Input.Expression.ExpressionKind !=
DbExpressionKind
.LeftOuterJoin)
2638
if (rightProject.Projection.ExpressionKind !=
DbExpressionKind
.Property)
2650
loj.JoinCondition.ExpressionKind !=
DbExpressionKind
.Constant)
2669
if (loj.Left.Expression.ExpressionKind !=
DbExpressionKind
.NewInstance)
2674
if (lojLeft.Arguments.Count != 1 || lojLeft.Arguments[0].ExpressionKind !=
DbExpressionKind
.Constant)
2683
if (loj.Right.Expression.ExpressionKind !=
DbExpressionKind
.Property)
2922
if (cqtExpression.ExpressionKind !=
DbExpressionKind
.Project)
2928
if (project.Projection.ExpressionKind !=
DbExpressionKind
.NewInstance ||
2939
if (projection.Arguments[i].ExpressionKind !=
DbExpressionKind
.Property)
2952
if (project.Input.Expression.ExpressionKind !=
DbExpressionKind
.Project)
2958
if (innerProject.Projection.ExpressionKind !=
DbExpressionKind
.NewInstance ||
3016
if (
DbExpressionKind
.Sort != source.ExpressionKind)
System\Data\Objects\ELinq\OrderByLifter.cs (31)
102
if (source.ExpressionKind ==
DbExpressionKind
.Sort)
106
if (source.ExpressionKind ==
DbExpressionKind
.Project)
110
if (projectInput.ExpressionKind ==
DbExpressionKind
.Sort)
114
if (projectInput.ExpressionKind ==
DbExpressionKind
.Skip)
118
if (projectInput.ExpressionKind ==
DbExpressionKind
.Limit)
122
if (limitInput.ExpressionKind ==
DbExpressionKind
.Sort)
126
if (limitInput.ExpressionKind ==
DbExpressionKind
.Skip)
132
if (source.ExpressionKind ==
DbExpressionKind
.Skip)
136
if (source.ExpressionKind ==
DbExpressionKind
.Limit)
140
if (limitInput.ExpressionKind ==
DbExpressionKind
.Sort)
144
if (limitInput.ExpressionKind ==
DbExpressionKind
.Skip)
148
if (limitInput.ExpressionKind ==
DbExpressionKind
.Project)
152
if (projectInput.ExpressionKind ==
DbExpressionKind
.Sort)
158
if (projectInput.ExpressionKind ==
DbExpressionKind
.Skip)
240
if (left.ExpressionKind ==
DbExpressionKind
.Constant &&
241
right.ExpressionKind ==
DbExpressionKind
.Constant)
329
if (_limit.Limit.ExpressionKind ==
DbExpressionKind
.Constant &&
330
k.ExpressionKind ==
DbExpressionKind
.Constant)
381
if (_limit.Limit.ExpressionKind ==
DbExpressionKind
.Constant &&
382
k.ExpressionKind ==
DbExpressionKind
.Constant)
452
if (_limit.Limit.ExpressionKind ==
DbExpressionKind
.Constant &&
453
k.ExpressionKind ==
DbExpressionKind
.Constant)
476
if (_skip.Count.ExpressionKind ==
DbExpressionKind
.Constant &&
477
_limit.Limit.ExpressionKind ==
DbExpressionKind
.Constant &&
478
k.ExpressionKind ==
DbExpressionKind
.Constant)
549
if (_limit.Limit.ExpressionKind ==
DbExpressionKind
.Constant &&
550
k.ExpressionKind ==
DbExpressionKind
.Constant)
623
if (_skip.Count.ExpressionKind ==
DbExpressionKind
.Constant &&
624
k.ExpressionKind ==
DbExpressionKind
.Constant)
672
if (_skip.Count.ExpressionKind ==
DbExpressionKind
.Constant &&
673
k.ExpressionKind ==
DbExpressionKind
.Constant)
System\Data\Objects\ELinq\Translator.cs (1)
332
if (
DbExpressionKind
.Property == instance.ExpressionKind)
System\Data\Objects\Internal\ObjectSpanRewriter.cs (14)
171
case
DbExpressionKind
.Element:
173
case
DbExpressionKind
.Limit:
222
if (
DbExpressionKind
.NewInstance == expression.ExpressionKind)
463
if (
DbExpressionKind
.Project == expression.ExpressionKind)
784
case
DbExpressionKind
.RelationshipNavigation:
785
case
DbExpressionKind
.Distinct:
786
case
DbExpressionKind
.Filter:
787
case
DbExpressionKind
.Limit:
788
case
DbExpressionKind
.OfType:
789
case
DbExpressionKind
.Project:
790
case
DbExpressionKind
.Sort:
791
case
DbExpressionKind
.Skip:
834
if (
DbExpressionKind
.Deref == testExpr.ExpressionKind)
839
if (
DbExpressionKind
.VariableReference == testExpr.ExpressionKind)
System\Data\Query\PlanCompiler\CTreeGenerator.cs (7)
1865
private DbExpression VisitBinaryJoin(Node joinNode,
DbExpressionKind
joinKind)
1986
return VisitBinaryJoin(n,
DbExpressionKind
.InnerJoin);
1992
return VisitBinaryJoin(n,
DbExpressionKind
.LeftOuterJoin);
1998
return VisitBinaryJoin(n,
DbExpressionKind
.FullOuterJoin);
2011
private DbExpression VisitApply(Node applyNode,
DbExpressionKind
applyKind)
2061
return VisitApply(n,
DbExpressionKind
.CrossApply);
2067
return VisitApply(n,
DbExpressionKind
.OuterApply);
System\Data\Query\PlanCompiler\ITreeGenerator.cs (83)
194
private static Dictionary<
DbExpressionKind
, OpType> s_opMap = InitializeExpressionKindToOpTypeMap();
217
private static Dictionary<
DbExpressionKind
, OpType> InitializeExpressionKindToOpTypeMap()
219
Dictionary<
DbExpressionKind
, OpType> opMap = new Dictionary<
DbExpressionKind
, OpType>(12);
224
opMap[
DbExpressionKind
.Plus] = OpType.Plus;
225
opMap[
DbExpressionKind
.Minus] = OpType.Minus;
226
opMap[
DbExpressionKind
.Multiply] = OpType.Multiply;
227
opMap[
DbExpressionKind
.Divide] = OpType.Divide;
228
opMap[
DbExpressionKind
.Modulo] = OpType.Modulo;
229
opMap[
DbExpressionKind
.UnaryMinus] = OpType.UnaryMinus;
234
opMap[
DbExpressionKind
.Equals] = OpType.EQ;
235
opMap[
DbExpressionKind
.NotEquals] = OpType.NE;
236
opMap[
DbExpressionKind
.LessThan] = OpType.LT;
237
opMap[
DbExpressionKind
.GreaterThan] = OpType.GT;
238
opMap[
DbExpressionKind
.LessThanOrEquals] = OpType.LE;
239
opMap[
DbExpressionKind
.GreaterThanOrEquals] = OpType.GE;
275
PlanCompiler.Assert(ctree.Query.ExpressionKind ==
DbExpressionKind
.Project,
365
case
DbExpressionKind
.Equals:
366
case
DbExpressionKind
.NotEquals:
367
case
DbExpressionKind
.LessThan:
368
case
DbExpressionKind
.LessThanOrEquals:
369
case
DbExpressionKind
.GreaterThan:
370
case
DbExpressionKind
.GreaterThanOrEquals:
371
case
DbExpressionKind
.And:
372
case
DbExpressionKind
.Or:
373
case
DbExpressionKind
.Not:
374
case
DbExpressionKind
.Like:
375
case
DbExpressionKind
.IsEmpty:
376
case
DbExpressionKind
.IsNull:
377
case
DbExpressionKind
.IsOf:
378
case
DbExpressionKind
.IsOfOnly:
379
case
DbExpressionKind
.Any:
380
case
DbExpressionKind
.All:
382
case
DbExpressionKind
.VariableReference:
385
case
DbExpressionKind
.Lambda:
401
case
DbExpressionKind
.Function:
530
List<Node> arguments = new List<Node>((expr.ExpressionKind ==
DbExpressionKind
.IsNull) ? 3 : 5);
539
if (expr.ExpressionKind !=
DbExpressionKind
.IsNull)
549
if (expr.ExpressionKind !=
DbExpressionKind
.IsNull)
1212
if (propertyExpression.Instance.ExpressionKind ==
DbExpressionKind
.Property &&
1265
if (e.Instance.ExpressionKind ==
DbExpressionKind
.NewInstance &&
1325
(e.ExpressionKind ==
DbExpressionKind
.Equals || e.ExpressionKind ==
DbExpressionKind
.NotEquals))
1474
if (e.Argument.ExpressionKind ==
DbExpressionKind
.IsNull)
1478
else if (e.Argument.ExpressionKind ==
DbExpressionKind
.Not)
1481
if (notExpression.Argument.ExpressionKind ==
DbExpressionKind
.IsNull)
1591
PlanCompiler.Assert(
DbExpressionKind
.Except == expression.ExpressionKind ||
1592
DbExpressionKind
.Intersect == expression.ExpressionKind ||
1593
DbExpressionKind
.UnionAll == expression.ExpressionKind,
1623
case
DbExpressionKind
.Except:
1627
case
DbExpressionKind
.Intersect:
1631
case
DbExpressionKind
.UnionAll:
1678
if (
DbExpressionKind
.IsOfOnly == e.ExpressionKind)
1734
this.isExact = (template.ExpressionKind ==
DbExpressionKind
.IsOfOnly);
1740
this.isExact = (template.ExpressionKind ==
DbExpressionKind
.OfTypeOnly);
1838
return Merge(other.OfType, (other.ExpressionKind ==
DbExpressionKind
.IsOfOnly));
1843
return Merge(other.OfType, (other.ExpressionKind ==
DbExpressionKind
.OfTypeOnly));
1875
if(filter.Predicate.ExpressionKind !=
DbExpressionKind
.IsOf &&
1876
filter.Predicate.ExpressionKind !=
DbExpressionKind
.IsOfOnly)
1882
return (isOfArgument.ExpressionKind ==
DbExpressionKind
.VariableReference &&
1906
case
DbExpressionKind
.Distinct:
1912
case
DbExpressionKind
.Filter:
1931
case
DbExpressionKind
.OfType:
1932
case
DbExpressionKind
.OfTypeOnly:
1946
case
DbExpressionKind
.Project:
1949
if(project.Projection.ExpressionKind ==
DbExpressionKind
.VariableReference &&
1963
case
DbExpressionKind
.Sort:
2283
PlanCompiler.Assert(
DbExpressionKind
.CrossJoin == e.ExpressionKind ||
2284
DbExpressionKind
.InnerJoin == e.ExpressionKind ||
2285
DbExpressionKind
.LeftOuterJoin == e.ExpressionKind ||
2286
DbExpressionKind
.FullOuterJoin == e.ExpressionKind,
2336
case
DbExpressionKind
.CrossJoin:
2342
case
DbExpressionKind
.InnerJoin:
2348
case
DbExpressionKind
.LeftOuterJoin:
2354
case
DbExpressionKind
.FullOuterJoin:
2369
if (e.ExpressionKind !=
DbExpressionKind
.CrossJoin)
2416
PlanCompiler.Assert(
DbExpressionKind
.CrossApply == e.ExpressionKind ||
DbExpressionKind
.OuterApply == e.ExpressionKind, "Unrecognized DbExpressionKind specified in DbApplyExpression");
2422
if (
DbExpressionKind
.CrossApply == e.ExpressionKind)
2960
PlanCompiler.Assert(
DbExpressionKind
.Any == e.ExpressionKind ||
DbExpressionKind
.All == e.ExpressionKind, "Invalid DbExpressionKind in DbQuantifierExpression");
2979
if (
DbExpressionKind
.All == e.ExpressionKind)
3025
if (
DbExpressionKind
.All == e.ExpressionKind)
System\Data\SqlClient\SqlGen\DmlSqlGenerator.cs (4)
511
Debug.Assert(expression.ExpressionKind ==
DbExpressionKind
.Equals,
531
Debug.Assert(propertyExpression.ExpressionKind ==
DbExpressionKind
.Property,
538
if (value.ExpressionKind !=
DbExpressionKind
.Null)
540
Debug.Assert(value.ExpressionKind ==
DbExpressionKind
.Constant,
System\Data\SqlClient\SqlGen\Sql8ExpressionRewriter.cs (18)
69
/// <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
75
return TransformIntersectOrExcept(VisitExpression(e.Left), VisitExpression(e.Right),
DbExpressionKind
.Except);
79
/// <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
85
return TransformIntersectOrExcept(VisitExpression(e.Left), VisitExpression(e.Right),
DbExpressionKind
.Intersect);
109
/// NON-DISTINCT EXCEPT (specially translated, <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
141
if (sortClause.Expression.ExpressionKind ==
DbExpressionKind
.Property)
147
DbExpression exceptExpression = TransformIntersectOrExcept(leftInput, rightInput,
DbExpressionKind
.Skip, sortExpressions, e.Input.VariableName);
159
/// <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
165
private DbExpression TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind)
208
private DbExpression TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)
210
bool negate = (expressionKind ==
DbExpressionKind
.Except) || (expressionKind ==
DbExpressionKind
.Skip);
211
bool distinct = (expressionKind ==
DbExpressionKind
.Except) || (expressionKind ==
DbExpressionKind
.Intersect);
226
if (expressionKind ==
DbExpressionKind
.Skip)
324
/// Helper method for <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
402
if (expr1.Instance.ExpressionKind ==
DbExpressionKind
.Property)
415
/// Helper method for <see cref="TransformIntersectOrExcept(DbExpression left, DbExpression right,
DbExpressionKind
expressionKind, IList<DbPropertyExpression> sortExpressionsOverLeft, string sortExpressionsBindingVariableName)"/>
System\Data\SqlClient\SqlGen\SqlFunctionCallHandler.cs (1)
806
if (instanceExpression.ExpressionKind !=
DbExpressionKind
.Function)
System\Data\SqlClient\SqlGen\SqlGenerator.cs (104)
581
return VisitBinaryExpression(" AND ",
DbExpressionKind
.And, e.Left, e.Right);
601
case
DbExpressionKind
.CrossApply:
605
case
DbExpressionKind
.OuterApply:
616
return VisitJoinExpression(inputs,
DbExpressionKind
.CrossJoin, joinString, null);
631
case
DbExpressionKind
.Divide:
634
case
DbExpressionKind
.Minus:
637
case
DbExpressionKind
.Modulo:
640
case
DbExpressionKind
.Multiply:
643
case
DbExpressionKind
.Plus:
647
case
DbExpressionKind
.UnaryMinus:
736
case
DbExpressionKind
.Equals:
739
case
DbExpressionKind
.LessThan:
742
case
DbExpressionKind
.LessThanOrEquals:
745
case
DbExpressionKind
.GreaterThan:
748
case
DbExpressionKind
.GreaterThanOrEquals:
752
case
DbExpressionKind
.NotEquals:
795
if (e.ExpressionKind ==
DbExpressionKind
.Like)
824
if (expr.ExpressionKind ==
DbExpressionKind
.Function)
869
return (argument.ExpressionKind ==
DbExpressionKind
.Property) &&
882
DbExpressionKind
expressionKind = argument.ExpressionKind;
890
return (expressionKind ==
DbExpressionKind
.Constant ||
891
expressionKind ==
DbExpressionKind
.ParameterReference ||
892
expressionKind ==
DbExpressionKind
.Null) &&
1630
case
DbExpressionKind
.FullOuterJoin:
1634
case
DbExpressionKind
.InnerJoin:
1638
case
DbExpressionKind
.LeftOuterJoin:
1673
if (e.Escape.ExpressionKind !=
DbExpressionKind
.Null)
1804
if (comparisonExpression.ExpressionKind ==
DbExpressionKind
.Equals)
1812
SqlBuilder binaryResult = VisitBinaryExpression(" <> ",
DbExpressionKind
.NotEquals, comparisonExpression.Left, comparisonExpression.Right);
1921
var realValues = values.Where(v => v.ExpressionKind !=
DbExpressionKind
.IsNull);
1970
DbIsNullExpression isNullExpression = values.FirstOrDefault(v => v.ExpressionKind ==
DbExpressionKind
.IsNull) as DbIsNullExpression;
2015
case
DbExpressionKind
.Constant:
2058
case
DbExpressionKind
.Property:
2064
case
DbExpressionKind
.ParameterReference:
2070
case
DbExpressionKind
.VariableReference:
2074
case
DbExpressionKind
.Cast:
2094
case
DbExpressionKind
.Property:
2098
case
DbExpressionKind
.ParameterReference:
2102
case
DbExpressionKind
.VariableReference:
2106
case
DbExpressionKind
.Cast:
2125
return (e.ExpressionKind ==
DbExpressionKind
.Property
2126
|| e.ExpressionKind ==
DbExpressionKind
.VariableReference
2127
|| e.ExpressionKind ==
DbExpressionKind
.ParameterReference);
2164
case
DbExpressionKind
.Equals:
2168
case
DbExpressionKind
.IsNull:
2178
case
DbExpressionKind
.Or:
2399
bool negatePredicate = (e.ExpressionKind ==
DbExpressionKind
.All);
2400
if (e.ExpressionKind ==
DbExpressionKind
.Any)
2406
Debug.Assert(e.ExpressionKind ==
DbExpressionKind
.All);
2716
private SqlBuilder VisitBinaryExpression(string op,
DbExpressionKind
expressionKind, DbExpression left, DbExpression right)
2744
private static IEnumerable<DbExpression> FlattenAssociativeExpression(
DbExpressionKind
kind, DbExpression left, DbExpression right)
2746
if(kind !=
DbExpressionKind
.Or &&
2747
kind !=
DbExpressionKind
.And &&
2748
kind !=
DbExpressionKind
.Plus &&
2749
kind !=
DbExpressionKind
.Multiply)
2770
private static void ExtractAssociativeArguments(
DbExpressionKind
expressionKind, List<DbExpression> argumentList, DbExpression expression)
2806
if (left.ExpressionKind ==
DbExpressionKind
.Constant)
2817
if (right.ExpressionKind ==
DbExpressionKind
.Constant)
2915
if (e.Arguments.Count == 1 && e.Arguments[0].ExpressionKind ==
DbExpressionKind
.Element)
2920
if (!IsCompatible(result,
DbExpressionKind
.Element))
2975
if (e.Argument.ExpressionKind ==
DbExpressionKind
.ParameterReference)
3017
private ISqlFragment VisitJoinExpression(IList<DbExpressionBinding> inputs,
DbExpressionKind
joinKind,
3055
bool needsJoinContext = (input.Expression.ExpressionKind ==
DbExpressionKind
.Scan)
3080
case
DbExpressionKind
.FullOuterJoin:
3081
case
DbExpressionKind
.InnerJoin:
3082
case
DbExpressionKind
.LeftOuterJoin:
3897
if (e.ExpressionKind ==
DbExpressionKind
.Constant)
3921
return (
DbExpressionKind
.CrossApply == e.ExpressionKind ||
DbExpressionKind
.OuterApply == e.ExpressionKind);
3933
return (
DbExpressionKind
.CrossJoin == e.ExpressionKind ||
3934
DbExpressionKind
.FullOuterJoin == e.ExpressionKind ||
3935
DbExpressionKind
.InnerJoin == e.ExpressionKind ||
3936
DbExpressionKind
.LeftOuterJoin == e.ExpressionKind);
3952
case
DbExpressionKind
.Constant:
3953
case
DbExpressionKind
.ParameterReference:
3954
case
DbExpressionKind
.Property:
3955
case
DbExpressionKind
.Cast:
3970
private static bool IsCompatible(SqlSelectStatement result,
DbExpressionKind
expressionKind)
3974
case
DbExpressionKind
.Distinct:
3981
case
DbExpressionKind
.Filter:
3987
case
DbExpressionKind
.GroupBy:
3994
case
DbExpressionKind
.Limit:
3995
case
DbExpressionKind
.Element:
3998
case
DbExpressionKind
.Project:
4008
case
DbExpressionKind
.Skip:
4014
case
DbExpressionKind
.Sort:
4085
case
DbExpressionKind
.Project:
4086
case
DbExpressionKind
.Filter:
4087
case
DbExpressionKind
.GroupBy:
4088
case
DbExpressionKind
.Sort:
4100
case
DbExpressionKind
.Scan:
4101
case
DbExpressionKind
.CrossJoin:
4102
case
DbExpressionKind
.FullOuterJoin:
4103
case
DbExpressionKind
.InnerJoin:
4104
case
DbExpressionKind
.LeftOuterJoin:
4105
case
DbExpressionKind
.CrossApply:
4106
case
DbExpressionKind
.OuterApply:
4157
if (!IsCompatible(result,
DbExpressionKind
.Filter))
4196
private static void WrapNonQueryExtent(SqlSelectStatement result, ISqlFragment sqlFragment,
DbExpressionKind
expressionKind)
4200
case
DbExpressionKind
.Function:
4335
if (allowConstants && (expression.ExpressionKind ==
DbExpressionKind
.Constant))
4341
if (expression.ExpressionKind ==
DbExpressionKind
.Cast)
4348
if (expression.ExpressionKind ==
DbExpressionKind
.Property)
4354
if (expression.ExpressionKind ==
DbExpressionKind
.VariableReference)