classJoinUsing
final class JoinUsing
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.USING (columns) [AS alias]: a join on equal columns of both sides, merged into one column each.
Mirrors the usingClause and join_using_alias of PostgreSQL's JoinExpr. The alias names the merged columns only. Source: https://www.postgresql.org/docs/17/queries-table-expressions.html#QUERIES-JOIN.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('SELECT 1 FROM a JOIN b USING (id) AS j');
[$query->statement->from->condition->columns[0]->value, $query->statement->from->condition->alias->value] // => ['id', 'j']Properties§
public non-empty-list<Name> $columnspublic Name|null $alias = nullMethods§
Parameters
Calls 2
- static-call Check::listOf() line 42
- class-const Name::class() line 42
public function render(Output $out): voidWrites USING, the columns and the alias.
Parameters
$out | Output |
Calls 4
- method-call Output::keyword() line 50
- method-call AliasSpelling::names() line 51
- new AliasSpelling line 51
- class-const NameUse::Alias() line 53
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
JoinUsingTestcalls