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