187 references to Operators
System.Data.Common (187)
System\Data\Filter\BinaryNode.cs (49)
83
if (_op ==
Operators
.Is)
88
if (un._op !=
Operators
.Not)
92
_op =
Operators
.IsNot;
97
if (((ZeroOpNode)_right)._op !=
Operators
.Null)
119
return new ZeroOpNode(
Operators
.Null);
125
return new ZeroOpNode(
Operators
.True);
127
return new ZeroOpNode(
Operators
.False);
202
if (op ==
Operators
.EqualTo || op ==
Operators
.NotEqual)
239
if (op ==
Operators
.EqualTo || op ==
Operators
.NotEqual)
297
if (op !=
Operators
.Or && op !=
Operators
.And && op !=
Operators
.In && op !=
Operators
.Is && op !=
Operators
.IsNot)
351
case
Operators
.Plus:
509
case
Operators
.Minus:
648
case
Operators
.Multiply:
754
case
Operators
.Divide:
861
case
Operators
.EqualTo:
865
return (0 == BinaryCompare(vLeft, vRight, resultType,
Operators
.EqualTo));
867
case
Operators
.GreaterThen:
873
case
Operators
.LessThen:
879
case
Operators
.GreaterOrEqual:
885
case
Operators
.LessOrEqual:
891
case
Operators
.NotEqual:
897
case
Operators
.Is:
905
case
Operators
.IsNot:
913
case
Operators
.And:
967
case
Operators
.Or:
1041
case
Operators
.Modulo:
1081
case
Operators
.In:
1114
if (0 == BinaryCompare(vLeft, vRight, resultType,
Operators
.EqualTo))
1284
if ((left == StorageType.Guid) && (right == StorageType.Guid) &&
Operators
.IsRelational(op))
1286
if ((left == StorageType.String) && (right == StorageType.Guid) &&
Operators
.IsRelational(op))
1288
if ((left == StorageType.Guid) && (right == StorageType.String) &&
Operators
.IsRelational(op))
1303
if (
Operators
.IsLogical(op))
1315
if (
Operators
.IsRelational(op) && left == StorageType.DateTimeOffset && right == StorageType.DateTimeOffset)
1320
if ((op ==
Operators
.Plus) && ((left == StorageType.String) || (right == StorageType.String)))
1327
if (
Operators
.IsArithmetical(op))
1340
if ((op ==
Operators
.Divide) && IsInteger(result))
1386
if (
Operators
.IsLogical(op))
1395
if (op ==
Operators
.Plus)
1421
if (op ==
Operators
.Plus || op ==
Operators
.Minus)
1430
if (!
Operators
.IsRelational(op))
1443
if (
Operators
.IsArithmetical(op))
1455
if ((op ==
Operators
.Divide) && IsIntegerSql(result))
System\Data\Filter\ExpressionParser.cs (83)
66
new ReservedWords("And", Tokens.BinaryOp,
Operators
.And),
72
new ReservedWords("Between", Tokens.BinaryOp,
Operators
.Between),
74
new ReservedWords("Child", Tokens.Child,
Operators
.Noop),
75
new ReservedWords("False", Tokens.ZeroOp,
Operators
.False),
76
new ReservedWords("In", Tokens.BinaryOp,
Operators
.In),
77
new ReservedWords("Is", Tokens.BinaryOp,
Operators
.Is),
78
new ReservedWords("Like", Tokens.BinaryOp,
Operators
.Like),
79
new ReservedWords("Not", Tokens.UnaryOp,
Operators
.Not),
80
new ReservedWords("Null", Tokens.ZeroOp,
Operators
.Null),
81
new ReservedWords("Or", Tokens.BinaryOp,
Operators
.Or),
82
new ReservedWords("Parent", Tokens.Parent,
Operators
.Noop),
83
new ReservedWords("True", Tokens.ZeroOp,
Operators
.True),
103
internal int _op =
Operators
.Noop;
150
_op =
Operators
.Noop;
155
_ops[_topOperator++] = new OperatorInfo(Nodes.Noop,
Operators
.Noop,
Operators
.PriStart);
195
BuildExpression(
Operators
.PriLow);
226
if (opInfo._type == Nodes.Binop && opInfo._op ==
Operators
.In && _token != Tokens.Parent)
325
if (opInfo._type == Nodes.Binop && opInfo._op ==
Operators
.In)
332
_ops[_topOperator++] = new OperatorInfo(Nodes.Call,
Operators
.Noop,
Operators
.PriParen);
337
_ops[_topOperator++] = new OperatorInfo(Nodes.Paren,
Operators
.Noop,
Operators
.PriParen);
345
BuildExpression(
Operators
.PriProc);
374
_ops[_topOperator++] = new OperatorInfo(Nodes.Call,
Operators
.Noop,
Operators
.PriParen);
383
BuildExpression(
Operators
.PriLow);
403
Debug.Assert(opInfo._priority ==
Operators
.PriParen, "melformed operator stack.");
428
node = new UnaryNode(_table,
Operators
.Noop, node);
448
BuildExpression(
Operators
.PriLow);
473
if (_op ==
Operators
.Plus)
475
_op =
Operators
.UnaryPlus;
478
else if (_op ==
Operators
.Minus)
481
_op =
Operators
.Negative;
487
throw ExprException.MissingOperandBefore(
Operators
.ToString(_op));
498
BuildExpression(
Operators
.Priority(_op));
501
_ops[_topOperator++] = new OperatorInfo(Nodes.Binop, _op,
Operators
.Priority(_op));
509
_ops[_topOperator++] = new OperatorInfo(Nodes.Unop, _op,
Operators
.Priority(_op));
521
_ops[_topOperator++] = new OperatorInfo(Nodes.Zop, _op,
Operators
.PriMax);
658
Debug.Assert(pri >
Operators
.PriStart && pri <=
Operators
.PriMax, "Invalid priority value");
688
case
Operators
.Between:
689
case
Operators
.BetweenAnd:
690
case
Operators
.BitwiseAnd:
691
case
Operators
.BitwiseOr:
692
case
Operators
.BitwiseXor:
693
case
Operators
.BitwiseNot:
696
case
Operators
.Is:
697
case
Operators
.Or:
698
case
Operators
.And:
699
case
Operators
.EqualTo:
700
case
Operators
.NotEqual:
701
case
Operators
.Like:
702
case
Operators
.LessThen:
703
case
Operators
.LessOrEqual:
704
case
Operators
.GreaterThen:
705
case
Operators
.GreaterOrEqual:
706
case
Operators
.In:
710
Debug.Assert(opInfo._op ==
Operators
.Plus ||
711
opInfo._op ==
Operators
.Minus ||
712
opInfo._op ==
Operators
.Multiply ||
713
opInfo._op ==
Operators
.Divide ||
714
opInfo._op ==
Operators
.Modulo,
722
if (opInfo._op ==
Operators
.Like)
741
case
Operators
.Not:
744
case
Operators
.BitwiseNot:
747
case
Operators
.Negative:
795
_op =
Operators
.Noop;
830
_op =
Operators
.EqualTo;
839
_op =
Operators
.GreaterOrEqual;
842
_op =
Operators
.GreaterThen;
850
_op =
Operators
.LessOrEqual;
855
_op =
Operators
.NotEqual;
858
_op =
Operators
.LessThen;
863
_op =
Operators
.Plus;
868
_op =
Operators
.Minus;
873
_op =
Operators
.Multiply;
878
_op =
Operators
.Divide;
883
_op =
Operators
.Modulo;
889
_op =
Operators
.BitwiseAnd;
894
_op =
Operators
.BitwiseOr;
898
_op =
Operators
.BitwiseXor;
902
_op =
Operators
.BitwiseNot;
System\Data\Filter\FilterException.cs (4)
103
return _Syntax(SR.Format(SR.Expr_MissingOperand,
Operators
.ToString(before._op)));
228
return _Eval(SR.Format(SR.Expr_TypeMismatchInBinop,
Operators
.ToString(op), type1, type2));
233
return _Eval(SR.Format(SR.Expr_AmbiguousBinop,
Operators
.ToString(op), type1, type2));
238
return _Eval(SR.Format(SR.Expr_UnsupportedOperator,
Operators
.ToString(op)));
System\Data\Filter\UnaryNode.cs (4)
58
case
Operators
.Noop:
60
case
Operators
.UnaryPlus:
68
case
Operators
.Negative:
127
case
Operators
.Not:
System\Data\Filter\ZeroOpNode.cs (9)
21
Debug.Assert(op ==
Operators
.True || op ==
Operators
.False || op ==
Operators
.Null, "Invalid zero-op");
33
case
Operators
.True:
35
case
Operators
.False:
37
case
Operators
.Null:
40
Debug.Assert(_op ==
Operators
.True || _op ==
Operators
.False || _op ==
Operators
.Null, "Invalid zero-op");
System\Data\Select.cs (38)
54
return ((op >=
Operators
.EqualTo && op <=
Operators
.LessOrEqual) || op ==
Operators
.Is || op ==
Operators
.IsNot);
65
if (expr._op ==
Operators
.Or)
71
if (expr._op ==
Operators
.And)
86
while (unaryNode._op ==
Operators
.Noop && unaryNode._right is UnaryNode && ((UnaryNode)unaryNode._right)._op ==
Operators
.Noop)
90
if (unaryNode._op ==
Operators
.Noop && unaryNode._right is BinaryNode)
114
while (unaryNode._op ==
Operators
.Noop && unaryNode._right is UnaryNode && ((UnaryNode)unaryNode._right)._op ==
Operators
.Noop)
118
if (unaryNode._op ==
Operators
.Noop && unaryNode._right is BinaryNode)
135
_linearExpression = (_linearExpression == null ? e : new BinaryNode(_table,
Operators
.And, e, _linearExpression));
144
canColumn.expr = (canColumn.expr == null ? expr : new BinaryNode(_table,
Operators
.And, expr, canColumn.expr));
145
if (expr._op ==
Operators
.EqualTo)
160
case
Operators
.GreaterThen: expr._op =
Operators
.LessThen; break;
161
case
Operators
.LessThen: expr._op =
Operators
.GreaterThen; break;
162
case
Operators
.GreaterOrEqual: expr._op =
Operators
.LessOrEqual; break;
163
case
Operators
.LessOrEqual: expr._op =
Operators
.GreaterOrEqual; break;
167
canColumn.expr = (canColumn.expr == null ? expr : new BinaryNode(_table,
Operators
.And, expr, canColumn.expr));
168
if (expr._op ==
Operators
.EqualTo)
177
_linearExpression = (_linearExpression == null ? expr : new BinaryNode(_table,
Operators
.And, expr, _linearExpression));
460
if (
Operators
.In == bnode._op ||
499
_linearExpression = (_linearExpression == null ? _candidateColumns[i].expr : new BinaryNode(_table,
Operators
.And, expr, _linearExpression));
638
if (expr._op ==
Operators
.And)
651
if (expr._op !=
Operators
.Is && expr._op !=
Operators
.IsNot)
700
case
Operators
.EqualTo: c = (c == 0 ? 0 : c < 0 ? -1 : 1); break;
701
case
Operators
.GreaterThen: c = (c > 0 ? 0 : -1); break;
702
case
Operators
.LessThen: c = (c < 0 ? 0 : 1); break;
703
case
Operators
.GreaterOrEqual: c = (c >= 0 ? 0 : -1); break;
704
case
Operators
.LessOrEqual: c = (c <= 0 ? 0 : 1); break;
705
case
Operators
.Is: c = (vLeft == DBNull.Value ? 0 : -1); break;
706
case
Operators
.IsNot: c = (vLeft != DBNull.Value ? 0 : 1); break;