enumJoinOperator
enum JoinOperator
@visibility public.The operator of a join, by the keywords that write it.
JOIN, INNER JOIN and CROSS JOIN are equivalent inner joins in MySQL and are kept as written; STRAIGHT_JOIN is an inner join that reads its left operand first. The optional OUTER after LEFT and RIGHT and the optional INNER after NATURAL do not change the join, and are kept as written because MySQL names an unaliased select list expression, which can hold a join in a subquery, after its text. Source: https://dev.mysql.com/doc/refman/8.4/en/join.html.
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::NaturalLeft->keywords() // => ['NATURAL', 'LEFT', 'JOIN']Cases§
case Joincase Innercase Crosscase StraightJoincase Leftcase Rightcase Naturalcase NaturalLeftcase NaturalRightcase LeftOutercase RightOutercase NaturalInnercase NaturalLeftOutercase NaturalRightOuterMethods§
public function keywords(): list<string>Answers the keywords the operator is written with.
Returns
list<string>\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::StraightJoin->keywords() // => ['STRAIGHT_JOIN']Test cases 1
Called from 1
Calls 14
- class-const JoinOperator::Join() line 49
- class-const JoinOperator::Inner() line 50
- class-const JoinOperator::Cross() line 51
- class-const JoinOperator::StraightJoin() line 52
- class-const JoinOperator::Left() line 53
- class-const JoinOperator::Right() line 54
- class-const JoinOperator::Natural() line 55
- class-const JoinOperator::NaturalLeft() line 56
- class-const JoinOperator::NaturalRight() line 57
- class-const JoinOperator::LeftOuter() line 58
- class-const JoinOperator::RightOuter() line 59
- class-const JoinOperator::NaturalInner() line 60
- class-const JoinOperator::NaturalLeftOuter() line 61
- class-const JoinOperator::NaturalRightOuter() line 62
public function natural(): boolTells whether the join merges the columns its operands have in common.
Returns
bool\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Natural->natural() // => trueTest cases 3
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:62
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:64
Calls 7
- function-call
in_arrayline 74 - class-const JoinOperator::Natural() line 74
- class-const JoinOperator::NaturalLeft() line 74
- class-const JoinOperator::NaturalRight() line 74
- class-const JoinOperator::NaturalInner() line 74
- class-const JoinOperator::NaturalLeftOuter() line 74
- class-const JoinOperator::NaturalRightOuter() line 74
public function keepsLeft(): boolTells whether the join keeps every row of its left operand, extending the right one with NULLs.
Returns
bool\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->keepsLeft() // => trueTest cases 1
Calls 5
- function-call
in_arrayline 85 - class-const JoinOperator::Left() line 85
- class-const JoinOperator::NaturalLeft() line 85
- class-const JoinOperator::LeftOuter() line 85
- class-const JoinOperator::NaturalLeftOuter() line 85
public function keepsRight(): boolTells whether the join keeps every row of its right operand, extending the left one with NULLs.
Returns
bool\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::NaturalRight->keepsRight() // => trueTest cases 1
Calls 5
- function-call
in_arrayline 96 - class-const JoinOperator::Right() line 96
- class-const JoinOperator::NaturalRight() line 96
- class-const JoinOperator::RightOuter() line 96
- class-const JoinOperator::NaturalRightOuter() line 96
public function conditioned(): boolTells whether the grammar requires an ON or USING condition after the right operand.
Returns
bool\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->conditioned() // => trueTest cases 1
Called from 1
Calls 5
- function-call
in_arrayline 107 - class-const JoinOperator::Left() line 107
- class-const JoinOperator::Right() line 107
- class-const JoinOperator::LeftOuter() line 107
- class-const JoinOperator::RightOuter() line 107
public function worded(): selfAnswers the operator written with the optional OUTER or INNER word; an operator without such a word answers itself.
Returns
self\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->worded() // => \SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::LeftOuterTest cases 1
Calls 14
- class-const JoinOperator::Left() line 119
- class-const JoinOperator::LeftOuter() line 119
- class-const JoinOperator::Right() line 120
- class-const JoinOperator::RightOuter() line 120
- class-const JoinOperator::Natural() line 121
- class-const JoinOperator::NaturalInner() line 121
- class-const JoinOperator::NaturalLeft() line 122
- class-const JoinOperator::NaturalLeftOuter() line 122
- class-const JoinOperator::NaturalRight() line 123
- class-const JoinOperator::NaturalRightOuter() line 123
- class-const JoinOperator::Join() line 124
- class-const JoinOperator::Inner() line 124
- class-const JoinOperator::Cross() line 124
- class-const JoinOperator::StraightJoin() line 124
Test cases 10§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
JoinOperatorTest::testConditionedTellsTheJoinsThatRequireAConditioncallsJoinOperatorTest::testKeepsLeftTellsTheLeftJoinscallsJoinOperatorTest::testKeepsRightTellsTheRightJoinscallsJoinOperatorTest::testKeywordsSpellEveryOperatorcallsJoinOperatorTest::testNaturalTellsTheNaturalJoinscallsJoinOperatorTest::testWordedAnswersTheOperatorWithItsOptionalWordcalls
Other tests reaching this symbol 4
Relations§
Method calls 4
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:62
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:63
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::__construct() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:64
- method-call SqlSemantics\Platform\MySql\Statement\Relation\JoinedTable::render() packages/sql-semantics-mysql/src/Statement/Relation/JoinedTable.php:81
Constant reads 21
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:42
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:44
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:46
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:47
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:48
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:49
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:50
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:51
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:52
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:58
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:58
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Legacy\JoinRule packages/sql-semantics-mysql/src/Lowering/Query/Legacy/JoinRule.php:58
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:51
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:51
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:52
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:52
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:53
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:53
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:54
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:54
- class-const SqlSemantics\Platform\MySql\Lowering\Query\Modern\ReferenceRule packages/sql-semantics-mysql/src/Lowering/Query/Modern/ReferenceRule.php:55