final class OperatorRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql\Lowering". Code outside that scope must not name this declaration.

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§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function lower(Form $form): ?Scalar

Lowers an operator production, or answers null when the production is not one.

Parameters

$formForm

Returns

Test cases 1
Called from 1
Calls 4

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 $lowering

Test cases 3§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 3

Relations§

Instantiated in 1
Method calls 1