classOperatorRule
final class OperatorRule
Lowers the operator productions of a_expr and b_expr.
Rule: PG-EXPRESSION-OPERATOR-001. Scope: the binary arithmetic and comparison operators, a general or OPERATOR(...) operator between or before operands, the prefix + and -, AND, OR, NOT, ::, COLLATE, AT TIME ZONE, AT LOCAL (17), IS [NOT] DISTINCT FROM and IS [NOT] DOCUMENT. Constructors: BinaryOperation, UnaryOperation, BooleanOperation, Negation, Cast, Collation, AtTimeZone, AtLocal, DistinctTest, DocumentTest. NOT and the lookahead NOT_LA are the same keyword. Termination: each operand is a strictly smaller subtree. Source: https://www.postgresql.org/docs/17/sql-expressions.html#SQL-EXPRESSIONS-OPERATOR-CALLS. Status: Implemented.
Methods§
Lowers an operator production, or answers null when the production is not one.
Parameters
$form | Form |
Returns
Test cases 1
Called from 1
Calls 4
- function-call
in_arrayline 65 - class-const OperatorRule::SYMBOLS() line 65
- method-call OperatorRule::operators() line 69
- method-call OperatorRule::postfix() line 69
Lowers the general, prefix and boolean operators.
Parameters
$form | Form |
Returns
Test cases 1
Called from 1
Calls 9
- new BinaryOperation line 80
- method-call Form::node() line 81
- new UnaryOperation line 85
- new OperatorName line 87
- method-call Form::token() line 87
- new BooleanOperation line 90
- class-const BooleanOperator::And() line 90
- class-const BooleanOperator::Or() line 91
- new Negation line 92
Lowers the operators written after their first operand.
Parameters
$form | Form |
Returns
Test cases 1
Called from 1
Calls 8
- new Cast line 105
- method-call Form::node() line 106
- class-const CastSpelling::Operator() line 108
- new Collation line 110
- new AtTimeZone line 111
- new AtLocal line 112
- new DistinctTest line 113
- new DocumentTest line 123
Private surface 2§
Implementation details, listed for orientation only.
private const SYMBOLS = ['a_expr: a_expr + a_expr', 'a_expr: a_expr - a_expr', 'a_expr: a_expr * a_expr…private Lowering $loweringTest cases 3§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.