classJoinStep
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.
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT 1 FROM t CROSS JOIN u');
$query->statement->from->steps[0]->relation->name->name->value // => 'u'$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\InvalidConstructionProperties§
public JoinOperator $operatorpublic Relation $relationMethods§
public function __construct(
public JoinOperator $operator,
public Relation $relation,
public JoinOn|JoinUsing|null $constraint = null,
)Parameters
$operator | JoinOperator | The operator before the term |
$relation | Relation | The joined relation |
$constraint | JoinOn|JoinUsing|null | The constraint written after the term |
Calls 1
- static-call Check::input() line 35
public function render(Output $out): voidWrites the operator, the term and the constraint.
Parameters
$out | Output |
Calls 1
- method-call Output::node() line 43
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
FromRuleTest::testConstraintLowersOnUsingAndNonecallsFromRuleTest::testOperatorLowersTheCommaTheBareJoinAndTheKeywordJoinscallsFromRuleTest::testTermLowersEachKindOfTermWithItsAliascallsFromScopeTest::testEnterDerivesEveryOnConditionInTheScopeOfTheWholeChaincallsFromScopeTest::testEnterReportsConstraintsWithoutAJoinAndInvalidOperatorscallsFromScopeTest::testNestedAddsAQualifiedOnlyRelationForAnAliasedJoincallsFromScopeTest::testOpenEntersAChainOrANestedInputAndRecordsItsFactcallsJoiningTest::testJoinCoalescesTheMergedColumnAndExtendsTheLeftSideOfARightJoincallsJoiningTest::testJoinExtendsTheRightSideOfALeftJoincallsJoiningTest::testJoinHidesTheRightUsingColumnAndKeepsTheLeftSidecallsJoiningTest::testJoinMergesEveryCommonNameOfANaturalJoincallsJoiningTest::testJoinReportsAUsingColumnThatAClosedSideLackscallsJoinChainTest::testRejectsAChainAsTheFirstTermcallsJoinChainTest::testRenderWritesTheFirstTermItsConstraintAndEachStepcallsJoinOnTest::testRenderWritesOnBeforeTheConditioncallsJoinUsingTest::testRenderWritesTheColumnsInParenthesescalls