final class JoinStep
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One further term of a join chain: the operator, the joined relation and its constraint.

Reading a joined termdoctest
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT 1 FROM t CROSS JOIN u');
    $query->statement->from->steps[0]->relation->name->name->value // => 'u'
Refusing a chain as a term, which must be written in parenthesesdoctest
$chain = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT 1 FROM t JOIN u')->statement->from;
    new \SqlSemantics\Platform\Sqlite\Statement\Relation\JoinStep(new \SqlSemantics\Platform\Sqlite\Statement\Relation\JoinOperator(), $chain) // throws \SqlSemantics\Platform\Sqlite\Model\Diagnostic\InvalidConstruction

Properties§

public JoinOperator $operator
public Relation $relation
public JoinOn|JoinUsing|null $constraint = null

Methods§

public function __construct(
    public JoinOperator $operator,
    public Relation $relation,
    public JoinOn|JoinUsing|null $constraint = null,
)

Parameters

$operatorJoinOperatorThe operator before the term
$relationRelationThe joined relation
$constraintJoinOn|JoinUsing|nullThe constraint written after the term
Calls 1
public function render(Output $out): void

Writes the operator, the term and the constraint.

Parameters

$outOutput
Calls 1

Test cases 18§

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 16

Relations§

Instantiated in 1
Constant reads 1
Type declarations 2