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\MySql\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
boolTest cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 16
CommonTablesTest::testAnchoredBindsTheColumnsOfTheNonrecursivePartcallsCommonTablesTest::testExtendedAddsTablesWithoutAQueryLevelcallsCommonTablesTest::testPendingFindsTheRecursiveTableARightOperandRefersTocallsCommonTablesTest::testShapeRenamesTheColumnsByTheColumnListcallsJoinedInputTest::testCompleteTellsWhetherEveryColumnIsKnowncallsJoinedInputTest::testCompleteTreatsANameThatDependsOnInputsAsUndecidedcallsJoinedInputTest::testOfAnswersTheShapeTheStarSelectscallsJoinedInputTest::testSlotAnswersTheSlotOfAnEntrycallsJoiningTest::testExtendMakesEveryColumnNullablecallsProjectionTest::testAdmitsMatchesTheCorrelationOrTableNamecallsProjectionTest::testFieldReferencesTheSlotOfTheRelationcallsProjectionTest::testMissingCollectsTheMissingInputscallsTailFactsTest::testDeriveReportsAnUnknownLockedTablecallsShowFactsTest::testQueryAnswersAnOpenProjectionForAnOpenShapecallsParameterListTest::testDeriveRelationAnswersOneNullablePositionPerParametercallsParameterListTest::testDeriveRelationAnswersTheRowOfAnAnalyzedRoutinecalls
Relations§
Instantiated in 40
- new SqlSemantics\Platform\MySql\Model\Statement\Fact\QueryFact::__construct() packages/sql-semantics-mysql/src/Model/Statement/Fact/QueryFact.php:67
- new SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::target() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:181
- new SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::target() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:184
- new SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::target() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:187
- new SqlSemantics\Platform\MySql\Rules\Account\PrivilegeChecks::target() packages/sql-semantics-mysql/src/Rules/Account/PrivilegeChecks.php:190
- new SqlSemantics\Platform\MySql\Rules\Query\CommonTables::bind() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:71
- new SqlSemantics\Platform\MySql\Rules\Query\CommonTables::shape() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:131
- new SqlSemantics\Platform\MySql\Rules\Query\DerivedShapes::shape() packages/sql-semantics-mysql/src/Rules/Query/DerivedShapes.php:54
- new SqlSemantics\Platform\MySql\Rules\Query\DerivedShapes::shape() packages/sql-semantics-mysql/src/Rules/Query/DerivedShapes.php:74
- new SqlSemantics\Platform\MySql\Rules\Query\From\JoinedInput::of() packages/sql-semantics-mysql/src/Rules/Query/From/JoinedInput.php:49
- 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\GroupedRow::deriveRelation() packages/sql-semantics-mysql/src/Rules/Query/Having/GroupedRow.php:46
- 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\Query\SelectFacts::derive() packages/sql-semantics-mysql/src/Rules/Query/SelectFacts.php:61
- new SqlSemantics\Platform\MySql\Rules\Query\TableShapes::named() packages/sql-semantics-mysql/src/Rules/Query/TableShapes.php:61
- new SqlSemantics\Platform\MySql\Rules\Query\TableShapes::named() packages/sql-semantics-mysql/src/Rules/Query/TableShapes.php:66
- new SqlSemantics\Platform\MySql\Rules\Query\TableShapes::named() packages/sql-semantics-mysql/src/Rules/Query/TableShapes.php:69
- new SqlSemantics\Platform\MySql\Rules\Query\TableShapes::named() packages/sql-semantics-mysql/src/Rules/Query/TableShapes.php:72
- new SqlSemantics\Platform\MySql\Rules\TableChange\ColumnChanges::apply() packages/sql-semantics-mysql/src/Rules/TableChange/ColumnChanges.php:117
- new SqlSemantics\Platform\MySql\Rules\TableChange\Renamings::derive() packages/sql-semantics-mysql/src/Rules/TableChange/Renamings.php:59
- new SqlSemantics\Platform\MySql\Rules\TableChange\Targets::target() packages/sql-semantics-mysql/src/Rules/TableChange/Targets.php:57
- new SqlSemantics\Platform\MySql\Rules\TableChange\Targets::target() packages/sql-semantics-mysql/src/Rules/TableChange/Targets.php:60
- new SqlSemantics\Platform\MySql\Rules\TableChange\Targets::target() packages/sql-semantics-mysql/src/Rules/TableChange/Targets.php:63
- new SqlSemantics\Platform\MySql\Rules\TableChange\Targets::optional() packages/sql-semantics-mysql/src/Rules/TableChange/Targets.php:73
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets::shape() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:58
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets::existing() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:86
- new SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets::existing() packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:89
- new SqlSemantics\Platform\MySql\Rules\Utility\ShowFacts::shape() packages/sql-semantics-mysql/src/Rules/Utility/ShowFacts.php:88
- new SqlSemantics\Platform\MySql\Rules\Utility\ShowFacts::open() packages/sql-semantics-mysql/src/Rules/Utility/ShowFacts.php:96
- new SqlSemantics\Platform\MySql\Rules\Utility\ShowTargets::derive() packages/sql-semantics-mysql/src/Rules/Utility/ShowTargets.php:53
- new SqlSemantics\Platform\MySql\Rules\Utility\ShowTargets::derive() packages/sql-semantics-mysql/src/Rules/Utility/ShowTargets.php:57
- new SqlSemantics\Platform\MySql\Statement\Dml\Evaluation::deriveStatement() packages/sql-semantics-mysql/src/Statement/Dml/Evaluation.php:65
- new SqlSemantics\Platform\MySql\Statement\Dml\Handler\OpenHandler::deriveRelation() packages/sql-semantics-mysql/src/Statement/Dml/Handler/OpenHandler.php:48
- new SqlSemantics\Platform\MySql\Statement\Dml\Insert\RowAlias::deriveRelation() packages/sql-semantics-mysql/src/Statement/Dml/Insert/RowAlias.php:77
- new SqlSemantics\Platform\MySql\Statement\Dml\Insert\RowAlias::deriveRelation() packages/sql-semantics-mysql/src/Statement/Dml/Insert/RowAlias.php:95
- new SqlSemantics\Platform\MySql\Statement\Relation\Dual::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/Dual.php:36
- new SqlSemantics\Platform\MySql\Statement\Relation\JsonTable::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/JsonTable.php:77
- new SqlSemantics\Platform\MySql\Statement\Routine\ParameterList::deriveRelation() packages/sql-semantics-mysql/src/Statement/Routine/ParameterList.php:63
- new SqlSemantics\Platform\MySql\Statement\Routine\Program\VariableDeclaration::deriveRelation() packages/sql-semantics-mysql/src/Statement/Routine/Program/VariableDeclaration.php:76
- new SqlSemantics\Platform\MySql\Statement\Utility\Show\Session\ShowProfile::deriveStatement() packages/sql-semantics-mysql/src/Statement/Utility/Show/Session/ShowProfile.php:74
Method calls 1
Type declarations 13
- type SqlSemantics\Platform\MySql\Model\Resolution\CommonBinding packages/sql-semantics-mysql/src/Model/Resolution/CommonBinding.php:23
- type SqlSemantics\Platform\MySql\Model\Resolution\VisibleRelation packages/sql-semantics-mysql/src/Model/Resolution/VisibleRelation.php:34
- type SqlSemantics\Platform\MySql\Model\Statement\Fact\QueryFact packages/sql-semantics-mysql/src/Model/Statement/Fact/QueryFact.php:42
- type SqlSemantics\Platform\MySql\Model\Statement\Fact\RelationFact packages/sql-semantics-mysql/src/Model/Statement/Fact/RelationFact.php:29
- type SqlSemantics\Platform\MySql\Model\Statement\Operation packages/sql-semantics-mysql/src/Model/Statement/Operation.php:99
- type SqlSemantics\Platform\MySql\Rules\Query\CommonTables packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:123
- type SqlSemantics\Platform\MySql\Rules\Query\DerivedShapes packages/sql-semantics-mysql/src/Rules/Query/DerivedShapes.php:44
- type SqlSemantics\Platform\MySql\Rules\TableChange\ColumnChanges packages/sql-semantics-mysql/src/Rules/TableChange/ColumnChanges.php:89
- type SqlSemantics\Platform\MySql\Rules\TableChange\ColumnNames packages/sql-semantics-mysql/src/Rules/TableChange/ColumnNames.php:64
- type SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:51
- type SqlSemantics\Platform\MySql\Rules\TableDefinition\TableTargets packages/sql-semantics-mysql/src/Rules/TableDefinition/TableTargets.php:117
- type SqlSemantics\Platform\MySql\Rules\Utility\ShowFacts packages/sql-semantics-mysql/src/Rules/Utility/ShowFacts.php:80
- type SqlSemantics\Platform\MySql\Rules\Utility\ShowFacts packages/sql-semantics-mysql/src/Rules/Utility/ShowFacts.php:102