classJoinUsing
final class JoinUsing
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The USING constraint of a join: the columns both sides are joined on and merged by.
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('SELECT 1 FROM t JOIN u USING (a, b)');
$query->statement->from->steps[0]->constraint->columns[1]->value // => 'b'Properties§
public non-empty-list<Name> $columnsMethods§
public function __construct(list<Name> $columns)Parameters
$columns | list<Name> | The column names in written order; at least one |
Calls 2
- static-call Check::listOf() line 36
- class-const Name::class() line 36
public function render(Output $out): voidWrites the constraint.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 44
- method-call Output::symbol() line 47
- method-call Output::name() line 49
- class-const NameUse::Column() line 49
Test cases 11§
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 9
FromRuleTest::testConstraintLowersOnUsingAndNonecallsFromScopeTest::testEnterReportsConstraintsWithoutAJoinAndInvalidOperatorscallsFromScopeTest::testNestedAddsAQualifiedOnlyRelationForAnAliasedJoincallsFromScopeTest::testOpenEntersAChainOrANestedInputAndRecordsItsFactcallsJoiningTest::testJoinCoalescesTheMergedColumnAndExtendsTheLeftSideOfARightJoincallsJoiningTest::testJoinHidesTheRightUsingColumnAndKeepsTheLeftSidecallsJoiningTest::testJoinReportsAUsingColumnThatAClosedSideLackscallsJoinChainTest::testRenderWritesTheFirstTermItsConstraintAndEachStepcallsJoinStepTest::testRenderWritesOperatorRelationAndConstraintcalls
Relations§
Instantiated in 1
Type checks 1
Type declarations 3
- type SqlSemantics\Platform\Sqlite\Lowering\Query\FromRule packages/sql-semantics-sqlite/src/Lowering/Query/FromRule.php:160
- type SqlSemantics\Platform\Sqlite\Statement\Relation\JoinChain packages/sql-semantics-sqlite/src/Statement/Relation/JoinChain.php:54
- type SqlSemantics\Platform\Sqlite\Statement\Relation\JoinStep packages/sql-semantics-sqlite/src/Statement/Relation/JoinStep.php:33