classOperators
final class Operators
Lowers operator names.
Rule: PG-OPERATOR-NAME-001. Scope: all_Op, MathOp, qual_Op, qual_all_Op, any_operator, and the operator tokens the expression grammar writes inline. Constructor: OperatorName. The name is the operator text; the token != is the operator <>, as the scanner converts it. OPERATOR(schema.op) keeps its qualifiers and the fact that the syntax was used. Termination: the qualifier chain is walked iteratively. Source: https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS. Status: Implemented.
Methods§
Lowers an operator token: Op, or one of the arithmetic and comparison terminals.
Parameters
$operator | Token |
Returns
Throws
ImplementationGap When the token is not an operatorCalled from 2
Calls 3
- new Name line 60
- class-const Operators::SYMBOLS() line 63
- static-call ImplementationGap::rule() line 63
public function operator(Node $operator): OperatorNameLowers all_Op, MathOp, qual_Op, qual_all_Op or any_operator.
Parameters
$operator | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
Calls 7
- function-call
in_arrayline 74 - class-const Operators::MATH() line 74
- new OperatorName line 75
- method-call Operators::symbol() line 75
- method-call Operators::operator() line 80
- method-call Operators::qualified() line 81
- static-call ImplementationGap::production() line 83
public function qualified(Node $operator, bool $explicit): OperatorNameLowers the qualifier chain of any_operator.
Parameters
$operator | Node | |
$explicit | bool |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
Calls 3
- new OperatorName line 99
- method-call Operators::operator() line 99
- static-call ImplementationGap::production() line 102
Private surface 3§
Implementation details, listed for orientation only.
private const SYMBOLS = ['+' => '+', '-' => '-', '*' => '*', '/' => '/', '%' => '%', '^' => '^', '<' =>…private const MATH = ['MathOp: +', 'MathOp: -', 'MathOp: *', 'MathOp: /', 'MathOp: %', 'MathOp: ^', …private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
OperatorsTestcalls