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

The operator of a set operation.

Each case holds its keyword. INTERSECT binds more tightly than UNION and EXCEPT, which bind equally and associate to the left (MySQL 8.0.31 and later accept INTERSECT and EXCEPT). Source: https://dev.mysql.com/doc/refman/8.4/en/set-operations.html.

Reading the operator of a uniondoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 UNION SELECT 2');
    $query->statement->operator // => \SqlSemantics\Platform\MySql\Statement\Query\Set\SetOperator::Union

Cases§

case Union = 'UNION'
case Except = 'EXCEPT'
case Intersect = 'INTERSECT'

Methods§

public function tighter(self $other): bool

Tells whether this operator binds more tightly than another.

Parameters

$otherself

Returns

bool
Comparing the binding of INTERSECT and UNIONdoctest
\SqlSemantics\Platform\MySql\Statement\Query\Set\SetOperator::Intersect->tighter(\SqlSemantics\Platform\MySql\Statement\Query\Set\SetOperator::Union) // => true
Called from 2
Calls 1

Test cases 17§

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

Dedicated tests 2
Other tests reaching this symbol 15

Relations§

Method calls 2
Constant reads 15
Type declarations 5