enum JoinOperator
Public API: explicitly declared with @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.

Reading the keywords of a join operatordoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::NaturalLeft->keywords() // => ['NATURAL', 'LEFT', 'JOIN']

Cases§

case Join
case Inner
case Cross
case StraightJoin
case Left
case Right
case Natural
case NaturalLeft
case NaturalRight
case LeftOuter
case RightOuter
case NaturalInner
case NaturalLeftOuter
case NaturalRightOuter

Methods§

public function keywords(): list<string>

Answers the keywords the operator is written with.

Returns

list<string>
Reading the keywords of STRAIGHT_JOINdoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::StraightJoin->keywords() // => ['STRAIGHT_JOIN']
Test cases 1
Called from 1
Calls 14
public function keepsLeft(): bool

Tells whether the join keeps every row of its left operand, extending the right one with NULLs.

Returns

bool
Telling a left joindoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->keepsLeft() // => true
Test cases 1
Calls 5
public function keepsRight(): bool

Tells whether the join keeps every row of its right operand, extending the left one with NULLs.

Returns

bool
Telling a right joindoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::NaturalRight->keepsRight() // => true
Test cases 1
Calls 5
public function conditioned(): bool

Tells whether the grammar requires an ON or USING condition after the right operand.

Returns

bool
Telling that a left join needs a conditiondoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->conditioned() // => true
Test cases 1
Called from 1
Calls 5
public function worded(): self

Answers the operator written with the optional OUTER or INNER word; an operator without such a word answers itself.

Returns

self
Reading LEFT OUTER JOINdoctest
\SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::Left->worded() // => \SqlSemantics\Platform\MySql\Statement\Relation\Join\JoinOperator::LeftOuter
Test cases 1
Calls 14

Test cases 10§

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

Dedicated tests 6
Other tests reaching this symbol 4

Relations§

Method calls 4
Constant reads 21
Type declarations 2