classRowShape
final class RowShape
uses Snapshot
Public API: explicitly declared with
@visibility public.The ordered output positions of a relation occurrence or query.
A shape is open when missing inputs prevent listing every position. The known positions are then still exact, but more may exist.
$semantics = new \SqlSemantics\Platform\PostgreSql\Semantics();
$table = $semantics->analyze('CREATE TABLE t (a INTEGER, b TEXT)');
$operation = $semantics->analyze('SELECT * FROM t', [$table]);
[$operation->shape()->complete(), count($operation->shape()->slots)] // => [true, 2]Properties§
public list<OutputSlot> $slotspublic list<MissingInput> $missingMethods§
public function __construct(list<OutputSlot> $slots, list<MissingInput> $missing = [])Parameters
$slots | list<OutputSlot> | The known positions in order |
$missing | list<MissingInput> | The inputs whose absence leaves the shape open |
Calls 3
- static-call Check::listOf() line 44
- class-const OutputSlot::class() line 44
- class-const MissingInput::class() line 45
public function complete(): boolTells whether every output position is listed.
Returns
boolCalled from 7
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::member() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:227
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::apply() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:43
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::apply() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:51
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::locate() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:156
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::identity() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:95
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges::generated() packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:90
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\KeyColumns::report() packages/sql-semantics-postgres/src/Rules/Table/KeyColumns.php:48
Test cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 21
WholeRowsTest::testFindSearchesTheEnclosingLevelscallsWholeRowsTest::testRowDependsOnAnOpenShapecallsWholeRowsTest::testRowReportsTwoRelationsOfOneNamecallsJoinedInputTest::testVisibleHoldsTheRelationsInOrdercallsJoiningTest::testExtendedMakesEverySlotNullablecallsLateralReachTest::testBarMarksEveryRelationOncecallsLateralReachTest::testBarredTellsABarredRelationcallsLateralReachTest::testReachedFindsTheBarredRelationOfAQualifiercallsLateralReachTest::testReachedFindsTheBarredRelationOfAResolvedColumncallsTableShapesTest::testImplicitIsEmptyWithoutADeclarationcallsVisibilityTest::testAdmitsMatchesTheNameAndSchemacallsVisibilityTest::testQualifiedOnlyHidesEverySlotcallsVisibilityTest::testRestrictedTellsAQualifiedOnlyRelationcallsVisibilityTest::testStarSkipsQualifiedOnlyRelationscallsVisibilityTest::testUnhiddenSkipsHiddenSlotscallsVisibilityTest::testUnqualifiedDropsTheSystemColumnsOfQualifiedOnlyRelationscallsVisibilityTest::testUnqualifiedKeepsAnEnvironmentWithoutQualifiedOnlyRelationscallsColumnReferenceTest::testDeriveScalarReadsAOneWordNameAsTheWholeRowOfARelationcallsColumnReferenceTest::testDeriveScalarReportsAMissingColumncallsColumnReferenceTest::testDeriveScalarResolvesAQualifiedColumncallsColumnStarTest::testDeriveScalarIsTheWholeRowOfTheRelationcalls
Relations§
Instantiated in 43
- new SqlSemantics\Platform\PostgreSql\Model\Statement\Fact\QueryFact::__construct() packages/sql-semantics-postgres/src/Model/Statement/Fact/QueryFact.php:67
- new SqlSemantics\Platform\PostgreSql\Rules\Access\GrantedRelations::derive() packages/sql-semantics-postgres/src/Rules/Access/GrantedRelations.php:54
- new SqlSemantics\Platform\PostgreSql\Rules\Access\GrantedRelations::derive() packages/sql-semantics-postgres/src/Rules/Access/GrantedRelations.php:60
- new SqlSemantics\Platform\PostgreSql\Rules\Access\GrantedRelations::derive() packages/sql-semantics-postgres/src/Rules/Access/GrantedRelations.php:63
- new SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::derive() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:50
- new SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::derive() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:56
- new SqlSemantics\Platform\PostgreSql\Rules\Catalog\PublishedTables::derive() packages/sql-semantics-postgres/src/Rules/Catalog/PublishedTables.php:59
- new SqlSemantics\Platform\PostgreSql\Rules\Manipulation\MergeFacts::nullable() packages/sql-semantics-postgres/src/Rules/Manipulation/MergeFacts.php:142
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Carrier::deriveRelation() packages/sql-semantics-postgres/src/Rules/Query/Carrier.php:41
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Carriers::carry() packages/sql-semantics-postgres/src/Rules/Query/Carriers.php:48
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::bind() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:81
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::shape() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:187
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::shape() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:198
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\SetOperationFacts::rebound() packages/sql-semantics-postgres/src/Rules/Query/Facts/SetOperationFacts.php:104
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::apply() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:55
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::fromQuery() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:70
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\FunctionShapes::derive() packages/sql-semantics-postgres/src/Rules/Resolution/FunctionShapes.php:91
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::join() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:83
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::join() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:86
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::extended() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:200
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::xml() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:79
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::json() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:135
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:63
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:69
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:80
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableShapes::input() packages/sql-semantics-postgres/src/Rules/Resolution/TableShapes.php:82
- new SqlSemantics\Platform\PostgreSql\Rules\Resolution\Visibility::star() packages/sql-semantics-postgres/src/Rules/Resolution/Visibility.php:121
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::dotted() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:86
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::record() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:99
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::record() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:101
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::record() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:107
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::record() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:109
- new SqlSemantics\Platform\PostgreSql\Rules\Routine\RelationTargets::column() packages/sql-semantics-postgres/src/Rules/Routine/RelationTargets.php:125
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::widened() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:132
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\Views::derive() packages/sql-semantics-postgres/src/Rules/Table/Definition/Views.php:41
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Targets::resolve() packages/sql-semantics-postgres/src/Rules/Table/Targets.php:59
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Targets::resolve() packages/sql-semantics-postgres/src/Rules/Table/Targets.php:62
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Targets::existing() packages/sql-semantics-postgres/src/Rules/Table/Targets.php:77
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Targets::shape() packages/sql-semantics-postgres/src/Rules/Table/Targets.php:90
- new SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\AlterDomainConstraint::deriveRelation() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/AlterDomainConstraint.php:62
- new SqlSemantics\Platform\PostgreSql\Statement\Catalog\Domain\CreateDomain::deriveRelation() packages/sql-semantics-postgres/src/Statement/Catalog/Domain/CreateDomain.php:76
- new SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Prepared\PreparedParameters::deriveRelation() packages/sql-semantics-postgres/src/Statement/Manipulation/Prepared/PreparedParameters.php:72
- new SqlSemantics\Platform\PostgreSql\Statement\Routine\RoutineParameters::deriveRelation() packages/sql-semantics-postgres/src/Statement/Routine/RoutineParameters.php:70
Method calls 7
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::member() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:227
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::apply() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:43
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases::apply() packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:51
- method-call SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining::locate() packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:156
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations::identity() packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:95
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges::generated() packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:90
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\KeyColumns::report() packages/sql-semantics-postgres/src/Rules/Table/KeyColumns.php:48
Type declarations 19
- type SqlSemantics\Platform\PostgreSql\Model\Resolution\CommonBinding packages/sql-semantics-postgres/src/Model/Resolution/CommonBinding.php:23
- type SqlSemantics\Platform\PostgreSql\Model\Resolution\VisibleRelation packages/sql-semantics-postgres/src/Model/Resolution/VisibleRelation.php:34
- type SqlSemantics\Platform\PostgreSql\Model\Statement\Fact\QueryFact packages/sql-semantics-postgres/src/Model/Statement/Fact/QueryFact.php:42
- type SqlSemantics\Platform\PostgreSql\Model\Statement\Fact\RelationFact packages/sql-semantics-postgres/src/Model/Statement/Fact/RelationFact.php:29
- type SqlSemantics\Platform\PostgreSql\Model\Statement\Operation packages/sql-semantics-postgres/src/Model/Statement/Operation.php:99
- type SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:176
- type SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:225
- type SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:38
- type SqlSemantics\Platform\PostgreSql\Rules\Resolution\ColumnAliases packages/sql-semantics-postgres/src/Rules/Resolution/ColumnAliases.php:61
- type SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:103
- type SqlSemantics\Platform\PostgreSql\Rules\Resolution\Joining packages/sql-semantics-postgres/src/Rules/Resolution/Joining.php:145
- type SqlSemantics\Platform\PostgreSql\Rules\Resolution\Visibility packages/sql-semantics-postgres/src/Rules/Resolution/Visibility.php:109
- type SqlSemantics\Platform\PostgreSql\Rules\Table\Command\Alterations packages/sql-semantics-postgres/src/Rules/Table/Command/Alterations.php:93
- type SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:47
- type SqlSemantics\Platform\PostgreSql\Rules\Table\Command\GeneratedChanges packages/sql-semantics-postgres/src/Rules/Table/Command/GeneratedChanges.php:88
- type SqlSemantics\Platform\PostgreSql\Rules\Table\KeyColumns packages/sql-semantics-postgres/src/Rules/Table/KeyColumns.php:30
- type SqlSemantics\Platform\PostgreSql\Rules\Table\KeyColumns packages/sql-semantics-postgres/src/Rules/Table/KeyColumns.php:46
- type SqlSemantics\Platform\PostgreSql\Rules\Table\Targets packages/sql-semantics-postgres/src/Rules/Table/Targets.php:83
- type SqlSemantics\Platform\PostgreSql\Rules\Table\Targets packages/sql-semantics-postgres/src/Rules/Table/Targets.php:118