enumSetOperator
enum SetOperator: string
Public API: explicitly declared with
@visibility public.The operator that combines the rows of two queries.
INTERSECT binds more tightly than UNION and EXCEPT; operators of the same level associate from the left. Source: https://www.postgresql.org/docs/17/queries-union.html.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 EXCEPT SELECT 2');
$query->statement->operator // => \SqlSemantics\Platform\PostgreSql\Statement\Query\SetOperator::ExceptCases§
case Union = 'UNION'case Intersect = 'INTERSECT'case Except = 'EXCEPT'Methods§
public function level(): intAnswers the binding level: INTERSECT binds more tightly than UNION and EXCEPT.
Returns
intCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Query\SetOperation::__construct() packages/sql-semantics-postgres/src/Statement/Query/SetOperation.php:60
- method-call SqlSemantics\Platform\PostgreSql\Statement\Query\SetOperation::__construct() packages/sql-semantics-postgres/src/Statement/Query/SetOperation.php:61
Calls 3
- class-const SetOperator::Union() line 31
- class-const SetOperator::Except() line 31
- class-const SetOperator::Intersect() line 32
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Query\SetOperation::__construct() packages/sql-semantics-postgres/src/Statement/Query/SetOperation.php:60
- method-call SqlSemantics\Platform\PostgreSql\Statement\Query\SetOperation::__construct() packages/sql-semantics-postgres/src/Statement/Query/SetOperation.php:61
Constant reads 4
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Query\SelectRule packages/sql-semantics-postgres/src/Lowering/Query/SelectRule.php:74
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Query\SelectRule packages/sql-semantics-postgres/src/Lowering/Query/SelectRule.php:75
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Query\SelectRule packages/sql-semantics-postgres/src/Lowering/Query/SelectRule.php:76
- class-const SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::recursiveForm() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:170