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 47§
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 45
ColumnLookupTest::testConditionalCollectsTheRelationsAndMissingInputsOfEveryOpenOccurrencecallsColumnLookupTest::testFindAdmitsOnlyTheOccurrenceTheQualifierNamescallsColumnLookupTest::testFindContinuesInTheEnclosingPositionWithAGreaterDepthcallsColumnLookupTest::testFindIsAmbiguousForSeveralSlotsAtOnePositioncallsColumnLookupTest::testFindIsConditionalWhileANearerOccurrenceIsIncompletelyKnowncallsColumnLookupTest::testFindIsConditionalWithoutCandidatesWhenNothingIsKnowncallsColumnLookupTest::testFindIsMissingOnlyWhenEverySearchedOccurrenceIsCompletecallsColumnLookupTest::testFindPrefersTheNearerPositionOverAFartherSlotcallsColumnLookupTest::testFindResolvesTheOnlySlotWithTheNamecallsColumnLookupTest::testFindSkipsHiddenSlotsForAnUnqualifiedNamecallsColumnLookupTest::testFindUsesAnImplicitSlotWhenNoShapeSlotHasTheNamecallsLookupLevelTest::testAdmitsAnAliasedOccurrenceByItsAliasOnlycallsLookupLevelTest::testAdmitsAPlainOccurrenceByItsNameAndSchemacallsLookupLevelTest::testAdmitsEveryOccurrenceWithoutAQualifiercallsLookupLevelTest::testFoundListsTheMatchingSlotsOfEveryAdmittedOccurrenceAtTheGivenDepthcallsLookupLevelTest::testFoundSearchesImplicitSlotsOnlyWhenNoDeclaredSlotMatchescallsLookupLevelTest::testOpenListsAnOccurrenceWithASlotWhoseNameIsUndecidedcallsLookupLevelTest::testOpenListsTheIncompleteOccurrencesWithoutAMatchcallsLookupLevelTest::testUndecidedCollectsTheMissingInputsOfTheShapeAndOfUnnamedSlotscallsValueGraphTest::testObjectsRefusesAPhpReferenceInsideAListcallsProjectionTest::testExpandAppendsAnOpenStarForAnIncompleteRelationcallsProjectionTest::testExpandSkipsTheHiddenColumnsOnlyWhenMergedcallsProjectionTest::testItemsNamesEveryKindOfResultColumncallsProjectionTest::testItemsReportsAStarWithoutInputAndAQualifierThatNamesNoRelationcallsSortScopesTest::testDeriveLetsABareAliasWinOnlyWhenAskedTocallsColumnFactsTest::testDenotedAnswersTheOutcomeOfAnUngroupedNameUsecallsColumnResolverTest::testAdmitsMatchesTheAliasOrTheNameWithAnOptionalSchemacallsColumnResolverTest::testFindIsConditionalWhenAnOpenRelationMayHoldTheNamecallsColumnResolverTest::testFindPrefersARelationColumnOverAnAliasAndAnAliasOverOuterScopescallsColumnResolverTest::testFindReportsAmbiguityAndHonoursHiddenAndQualifiedOnlyRelationscallsColumnResolverTest::testFindResolvesUnqualifiedQualifiedAndImplicitNamescallsColumnResolverTest::testMatchAnswersTheInputsTheNameOfAnUnnamedColumnDependsOncallsColumnResolverTest::testMatchFindsSlotsOrImplicitNamesAndOtherwiseAnswersTheMissingInputscallsFromScopeTest::testStarListsTheUnhiddenSlotsOfQualifiableRelationsOnlycallsJoinedInputTest::testFactAndVisibleRelationsAreKeptAsGivencallsJoiningTest::testClosedIsTrueOnlyForCompleteFullyNamedShapescallsJoiningTest::testCoalescedWidensOneSlotAndLinksItsOrigincallsJoiningTest::testExtendMakesEverySlotAndImplicitNullableAndKeepsOriginscallsJoiningTest::testJoinCoalescesTheMergedColumnAndExtendsTheLeftSideOfARightJoincallsJoiningTest::testJoinExtendsTheRightSideOfALeftJoincallsJoiningTest::testJoinHidesTheRightUsingColumnAndKeepsTheLeftSidecallsJoiningTest::testJoinMergesEveryCommonNameOfANaturalJoincallsJoiningTest::testJoinReportsAUsingColumnThatAClosedSideLackscallsJoiningTest::testLocateFindsTheFirstVisibleSlotByNamecallsJoiningTest::testReplacedSwapsOneRelationByPositioncalls
Relations§
Instantiated in 13
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes::scope() packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:119
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes::scope() packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:120
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\InsertFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/InsertFacts.php:69
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\MutationScope::open() packages/sql-semantics-sqlite/src/Rules/Mutation/MutationScope.php:58
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:61
- new SqlSemantics\Platform\Sqlite\Rules\Mutation\TriggerFacts::derive() packages/sql-semantics-sqlite/src/Rules/Mutation/TriggerFacts.php:65
- new SqlSemantics\Platform\Sqlite\Rules\Query\CompoundFacts::derive() packages/sql-semantics-sqlite/src/Rules/Query/CompoundFacts.php:81
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\FromScope::open() packages/sql-semantics-sqlite/src/Rules/Resolution/FromScope.php:63
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\FromScope::nested() packages/sql-semantics-sqlite/src/Rules/Resolution/FromScope.php:116
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\FromScope::nested() packages/sql-semantics-sqlite/src/Rules/Resolution/FromScope.php:122
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\Joining::join() packages/sql-semantics-sqlite/src/Rules/Resolution/Joining.php:66
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\Joining::coalesced() packages/sql-semantics-sqlite/src/Rules/Resolution/Joining.php:101
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\Joining::extend() packages/sql-semantics-sqlite/src/Rules/Resolution/Joining.php:165
Type declarations 14
- type SqlSemantics\Platform\Sqlite\Model\Resolution\LookupLevel packages/sql-semantics-sqlite/src/Model/Resolution/LookupLevel.php:75
- type SqlSemantics\Platform\Sqlite\Model\Resolution\LookupLevel packages/sql-semantics-sqlite/src/Model/Resolution/LookupLevel.php:88
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\GeneratedWrites packages/sql-semantics-sqlite/src/Rules/Mutation/GeneratedWrites.php:78
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\GeneratedWrites packages/sql-semantics-sqlite/src/Rules/Mutation/GeneratedWrites.php:93
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\GeneratedWrites packages/sql-semantics-sqlite/src/Rules/Mutation/GeneratedWrites.php:108
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\GeneratedWrites packages/sql-semantics-sqlite/src/Rules/Mutation/GeneratedWrites.php:162
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\MutationScope packages/sql-semantics-sqlite/src/Rules/Mutation/MutationScope.php:66
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\MutationScope packages/sql-semantics-sqlite/src/Rules/Mutation/MutationScope.php:87
- type SqlSemantics\Platform\Sqlite\Rules\Mutation\MutationScope packages/sql-semantics-sqlite/src/Rules/Mutation/MutationScope.php:107
- type SqlSemantics\Platform\Sqlite\Rules\Query\Projection packages/sql-semantics-sqlite/src/Rules/Query/Projection.php:92
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\ColumnResolver packages/sql-semantics-sqlite/src/Rules/Resolution/ColumnResolver.php:97
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\ColumnResolver packages/sql-semantics-sqlite/src/Rules/Resolution/ColumnResolver.php:119
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\Joining packages/sql-semantics-sqlite/src/Rules/Resolution/Joining.php:81
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\Joining packages/sql-semantics-sqlite/src/Rules/Resolution/Joining.php:94