classFromBinder
final class FromBinder
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Binds relation trees, keeping ON visibility and NULL extension at their correct stages.
Properties§
public TableResolver $tablespublic IdentitySequence $idsMethods§
public function __construct(public TableResolver $tables, public IdentitySequence $ids)Binds the dependencies used for semantic binding.
Parameters
$tables | TableResolver | |
$ids | IdentitySequence |
public function bind(Node $from): ?BoundRelationBuilds the FROM tree in SQL binding order.
Parameters
$from | Node |
Returns
Test cases 1
Called from 1
Calls 7
- static-call Tree::outer() line 32
- method-call FromBinder::relation() line 35
- method-call FromBinder::join() line 36
- class-const JoinKind::Cross() line 36
- method-call IdentitySequence::join() line 36
- method-call Node::tokens() line 38
- static-call Tree::unsupported() line 39
public function relation(Node $node): BoundRelationBinds one table reference or nested join.
Parameters
$node | Node |
Returns
Called from 6
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:92
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:93
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:92
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:93
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:86
- method-call SqlSemantics\Core\Binding\FromBinder::bind() packages/sql-semantics/src/Core/Binding/FromBinder.php:35
public function table(Node $source, list<string> $parts, ?Node $aliasNode): BoundRelationReturns
Called from 4
- method-call SqlSemantics\Platform\MySql\QueryRules::relation() packages/sql-semantics-mysql/src/QueryRules.php:69
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::relation() packages/sql-semantics-postgres/src/QueryRules.php:69
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:77
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:87
Calls 9
- function-call
strtoupperline 61 - function-call
array_sliceline 62 - function-call
countline 64 - static-call Tree::unsupported() line 65
- new TableUse line 69
- method-call IdentitySequence::relation() line 69
- method-call TableResolver::resolve() line 69
- new BoundRelation line 71
- new Scope line 71
Resolves the logical operation from a join production.
Parameters
$text | string | |
$source | Node |
Returns
Test cases 1
Called from 3
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:82
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:82
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:84
Calls 8
- function-call
strtoupperline 79 - function-call
str_containsline 80 - static-call Tree::unsupported() line 81
- class-const JoinKind::Left() line 85
- class-const JoinKind::Right() line 86
- class-const JoinKind::Full() line 87
- class-const JoinKind::Cross() line 88
- class-const JoinKind::Inner() line 89
public function join(
BoundRelation $left,
BoundRelation $right,
JoinKind $kind,
?Node $condition,
Node $source,
string $id,
): BoundRelationBinds the match predicate before extending the nullable inputs.
Parameters
$left | BoundRelation | |
$right | BoundRelation | |
$kind | JoinKind | |
$condition | ?Node | |
$source | Node | |
$id | string |
Returns
Called from 4
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:97
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:97
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:92
- method-call SqlSemantics\Core\Binding\FromBinder::bind() packages/sql-semantics/src/Core/Binding/FromBinder.php:36
Calls 10
- method-call ExpressionBinder::bind() line 99
- new ExpressionBinder line 99
- method-call ExpressionRules::predicate() line 101
- new ExpressionRules line 101
- function-call
in_arrayline 103 - class-const JoinKind::Right() line 103
- class-const JoinKind::Full() line 103
- class-const JoinKind::Left() line 104
- new BoundRelation line 106
- new Join line 106
Test cases 60§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 59
SchemaAnalyzerTestcallsColumnPropertiesTestcallsColumnReaderTestcallsConstraintReaderTestcallsIdentifiersTestcallsSchemaChangesTestcallsSchemaReaderTestcallsStatementListTestcallsTokenGroupsTestcallsTreeTestcallsTypeReaderTestcallsBinderTestcallsBoundRelationTest::testKeepsScopeAndRelationAtTheSameStagecallsExpressionBinderTestcallsExpressionRulesTestcallsIdentitySequenceTestcallsLiteralBinderTestcallsNullFactsTestcallsProjectionBinderTestcallsScopeTestcallsSelectBinderTestcallsSelectModifiersBinderTestcallsSyntaxGuardTestcallsTableResolverTestcallsTypeResolutionTestcallsDialectTestcallsBoundSelectTestcallsColumnBindingTestcallsExpressionKindTestcallsExpressionTestcallsJoinKindTestcallsJoinTestcallsOrderingTestcallsOutputColumnTestcallsTableUseTestcallsPlatformTestcallsNameRulesTestcallsQueryRulesTestcallsSchemaRulesTestcallsSyntaxRulesTestcallsTypeRulesTestcallsColumnDefinitionTestcallsColumnGenerationTestcallsConstraintKindTestcallsGenerationKindTestcallsInvariantTestcallsTableConstraintTestcallsTableDefinitionTestcallsSchemaBuilderTestcallsSchemaTestcallsSemanticExceptionTestcallsNullabilityTestcallsTypeDescriptorTestcallsSchemaTestcallsNameRulesTestcallsPlatformTestcallsQueryRulesTestcallsSchemaRulesTestcallsTypeRulesTestcalls
Relations§
Instantiated in 1
Method calls 16
- method-call SqlSemantics\Platform\MySql\QueryRules::relation() packages/sql-semantics-mysql/src/QueryRules.php:69
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:82
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:92
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:93
- method-call SqlSemantics\Platform\MySql\QueryRules::joined() packages/sql-semantics-mysql/src/QueryRules.php:97
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::relation() packages/sql-semantics-postgres/src/QueryRules.php:69
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:82
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:92
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:93
- method-call SqlSemantics\Platform\PostgreSql\QueryRules::joined() packages/sql-semantics-postgres/src/QueryRules.php:97
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:77
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:84
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:86
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:87
- method-call SqlSemantics\Platform\Sqlite\QueryRules::relation() packages/sql-semantics-sqlite/src/QueryRules.php:92
- method-call SqlSemantics\Core\Binding\SelectBinder::bind() packages/sql-semantics/src/Core/Binding/SelectBinder.php:46
Type declarations 6
- type SqlSemantics\Platform\MySql\QueryRules packages/sql-semantics-mysql/src/QueryRules.php:49
- type SqlSemantics\Platform\MySql\QueryRules packages/sql-semantics-mysql/src/QueryRules.php:75
- type SqlSemantics\Platform\PostgreSql\QueryRules packages/sql-semantics-postgres/src/QueryRules.php:49
- type SqlSemantics\Platform\PostgreSql\QueryRules packages/sql-semantics-postgres/src/QueryRules.php:75
- type SqlSemantics\Platform\Sqlite\QueryRules packages/sql-semantics-sqlite/src/QueryRules.php:59
- type SqlSemantics\Core\Policy\QueryRules packages/sql-semantics/src/Core/Policy/QueryRules.php:37