enum UnaryOperator: string
Public API: explicitly declared with @visibility public.

The prefix operators of the simple_expr level: +, -, ~ and the tight logical negation !.

Under HIGH_NOT_PRECEDENCE the keyword NOT is the tight negation and is written !. Each case holds the written operator. Source: https://dev.mysql.com/doc/refman/8.4/en/operator-precedence.html, https://dev.mysql.com/doc/refman/8.4/en/sql-mode.html#sqlmode_high_not_precedence.

Reading a unary minusdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a FROM t WHERE -a < 0');
    $query->statement->where->left->operator // => \SqlSemantics\Platform\MySql\Statement\Expression\Operator\UnaryOperator::Minus

Cases§

case Plus = '+'
case Minus = '-'
case Invert = '~'
case Not = '!'

Test cases 9§

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

Dedicated tests 1
Other tests reaching this symbol 8

Relations§

Constant reads 10
Type declarations 1