final class OperatorName
    implements OptionArgument
    uses Snapshot
Public API: explicitly declared with @visibility public.

The name of an operator, optionally schema-qualified with the OPERATOR(...) syntax.

An operator is a name looked up in the catalog, not a member of a closed set. != is read as the operator <>. The OPERATOR(...) syntax is kept because it gives the operator the precedence of "any other operator" whatever operator it names; an expression writes a qualified operator only with that syntax, while commands that name an operator as an object write the qualifiers bare. Source: https://www.postgresql.org/docs/17/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS, https://www.postgresql.org/docs/17/sql-expressions.html#SQL-EXPRESSIONS-OPERATOR-CALLS.

Reading the operator of a comparisondoctest
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT a FROM t WHERE a != 1');
    $query->statement->where->operator->name->value // => '<>'

Properties§

public list<Name> $qualifiers
public Name $name
public bool $explicit = false

Methods§

public function __construct(
    public Name $name,
    list<Name> $qualifiers = [],
    public bool $explicit = false,
)

Parameters

$nameNameThe operator symbol
$qualifierslist<Name>The schema qualifiers, outermost first
$explicitboolWhether the operator is written with the `OPERATOR(...)` syntax
Calls 7
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: an operator name holds no expression.

Parameters

$derivationDerivation
$environmentEnvironment
Test cases 1
public function render(Output $out): void

Test cases 77§

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

Dedicated tests 7
Other tests reaching this symbol 70

Relations§

Instantiated in 10
Type checks 13
Type declarations 37