classVisibleRelation
final class VisibleRelation
uses Snapshot
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
A relation occurrence as one position of a query sees it: its shape and the names that qualify it.
An occurrence with neither alias nor name, such as the merged columns of a join, is found by unqualified names only.
Properties§
public Relation $relationpublic RowShape $shapepublic Name|null $alias = nullpublic QualifiedName|null $name = nullpublic list<ImplicitSlot> $implicit = []Methods§
public function __construct(
public Relation $relation,
public RowShape $shape,
public Name|null $alias = null,
public QualifiedName|null $name = null,
public list<int> $hidden = [],
public list<ImplicitSlot> $implicit = [],
)Parameters
$relation | Relation | The occurrence |
$shape | RowShape | The row shape visible at this position |
$alias | Name|null | The correlation name; when present it is the only qualifier |
$name | QualifiedName|null | The relation name that qualifies the occurrence when it has no alias |
$hidden | list<int> | The slot positions an unqualified name and a star do not see, such as the duplicate of a merged join column |
$implicit | list<ImplicitSlot> | The slots found by name only |
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 13
ColumnResolverTest::testRowTellsWhetherATriggerRowIsVisiblecallsColumnResolverTest::testUndecidedJoinsTheInputsOfOpenOccurrencesAndUnnamedItemscallsJoinedInputTest::testCompleteTellsWhetherEveryColumnIsKnowncallsJoinedInputTest::testCompleteTreatsANameThatDependsOnInputsAsUndecidedcallsJoinedInputTest::testOfAnswersTheShapeTheStarSelectscallsJoinedInputTest::testSlotAnswersTheSlotOfAnEntrycallsJoiningTest::testExtendMakesEveryColumnNullablecallsResultReferencesTest::testAdmittedTellsWhetherTheQualifierFindsTheColumncallsResultReferencesTest::testUnaliasedMatchesAColumnItemByItsColumnInAnAdmittedOccurrencecallsProjectionTest::testAdmitsMatchesTheCorrelationOrTableNamecallsProjectionTest::testFieldReferencesTheSlotOfTheRelationcallsProjectionTest::testMissingCollectsTheMissingInputscallsTailFactsTest::testDeriveReportsAnUnknownLockedTablecalls
Relations§
Instantiated in 18
- new SqlSemantics\Platform\MySql\Rules\Dml\ChangeFacts::delete() packages/sql-semantics-mysql/src/Rules/Dml/ChangeFacts.php:87
- new SqlSemantics\Platform\MySql\Rules\Dml\HandlerFacts::read() packages/sql-semantics-mysql/src/Rules/Dml/HandlerFacts.php:44
- new SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts::open() packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:128
- new SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts::duplicates() packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:190
- new SqlSemantics\Platform\MySql\Rules\Dml\LoadFacts::derive() packages/sql-semantics-mysql/src/Rules/Dml/LoadFacts.php:37
- new SqlSemantics\Platform\MySql\Rules\Dml\SourceRelations::visible() packages/sql-semantics-mysql/src/Rules/Dml/SourceRelations.php:61
- new SqlSemantics\Platform\MySql\Rules\Dml\SourceRelations::visible() packages/sql-semantics-mysql/src/Rules/Dml/SourceRelations.php:63
- new SqlSemantics\Platform\MySql\Rules\Query\From\FromScope::open() packages/sql-semantics-mysql/src/Rules/Query/From/FromScope.php:62
- new SqlSemantics\Platform\MySql\Rules\Query\From\FromScope::open() packages/sql-semantics-mysql/src/Rules/Query/From/FromScope.php:64
- new SqlSemantics\Platform\MySql\Rules\Query\From\Joining::join() packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:68
- new SqlSemantics\Platform\MySql\Rules\Query\From\Joining::extend() packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:154
- new SqlSemantics\Platform\MySql\Rules\Query\Having\HavingScope::enter() packages/sql-semantics-mysql/src/Rules/Query/Having/HavingScope.php:46
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::variables() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:158
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramFacts::routine() packages/sql-semantics-mysql/src/Rules/Routine/ProgramFacts.php:81
- new SqlSemantics\Platform\MySql\Rules\Routine\RowAliases::visible() packages/sql-semantics-mysql/src/Rules/Routine/RowAliases.php:49
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets::scope() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:119
- new SqlSemantics\Platform\MySql\Rules\Utility\ShowFacts::derive() packages/sql-semantics-mysql/src/Rules/Utility/ShowFacts.php:56
- new SqlSemantics\Platform\MySql\Statement\Alter\AlterTable::deriveStatement() packages/sql-semantics-mysql/src/Statement/Alter/AlterTable.php:91
Type declarations 10
- type SqlSemantics\Platform\MySql\Model\Resolution\LookupLevel packages/sql-semantics-mysql/src/Model/Resolution/LookupLevel.php:75
- type SqlSemantics\Platform\MySql\Model\Resolution\LookupLevel packages/sql-semantics-mysql/src/Model/Resolution/LookupLevel.php:88
- type SqlSemantics\Platform\MySql\Rules\ColumnResolver::unlisted() packages/sql-semantics-mysql/src/Rules/ColumnResolver.php:173
- type SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:162
- type SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:182
- type SqlSemantics\Platform\MySql\Rules\Query\From\Joining packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:143
- type SqlSemantics\Platform\MySql\Rules\Query\Having\HavingScope::leave() packages/sql-semantics-mysql/src/Rules/Query/Having/HavingScope.php:121
- type SqlSemantics\Platform\MySql\Rules\Query\Projection packages/sql-semantics-mysql/src/Rules/Query/Projection.php:130
- type SqlSemantics\Platform\MySql\Rules\Query\Projection packages/sql-semantics-mysql/src/Rules/Query/Projection.php:147
- type SqlSemantics\Platform\MySql\Rules\Query\Projection packages/sql-semantics-mysql/src/Rules/Query/Projection.php:155