classRelationFact
final class RelationFact
uses Snapshot
Public API: explicitly declared with
@visibility public.What an operation derived for one relation occurrence or one table use.
$semantics = new \SqlSemantics\Platform\Sqlite\Semantics();
$table = $semantics->analyze('CREATE TABLE t (a INTEGER, b TEXT)');
$query = $semantics->analyze('SELECT a FROM t', [$table]);
count($query->facts->relation($query->inputRelation())->shape->slots) // => 2Properties§
public RowShape $shapepublic TableResolution|null $table = nullMethods§
public function __construct(public RowShape $shape, public TableResolution|null $table = null)Parameters
$shape | RowShape | The ordered output positions the occurrence contributes |
$table | TableResolution|null | The resolution of the relation name, when the occurrence names one |
Test cases 3§
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 2
Relations§
Instantiated in 14
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes::target() packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:82
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes::target() packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:85
- new SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes::target() packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:88
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\FromScope::enter() packages/sql-semantics-sqlite/src/Rules/Resolution/FromScope.php:97
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes::fact() packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:52
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes::fact() packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:60
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes::fact() packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:63
- new SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes::fact() packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:66
- new SqlSemantics\Platform\Sqlite\Statement\Expression\Subquery\InTable::deriveScalar() packages/sql-semantics-sqlite/src/Statement/Expression/Subquery/InTable.php:84
- new SqlSemantics\Platform\Sqlite\Statement\Relation\DerivedQuery::deriveRelation() packages/sql-semantics-sqlite/src/Statement/Relation/DerivedQuery.php:53
- new SqlSemantics\Platform\Sqlite\Statement\Relation\TableCall::deriveRelation() packages/sql-semantics-sqlite/src/Statement/Relation/TableCall.php:75
- new SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn::deriveRelation() packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:83
- new SqlSemantics\Platform\Sqlite\Statement\Schema\CreateTable::deriveRelation() packages/sql-semantics-sqlite/src/Statement/Schema/CreateTable.php:156
- new SqlSemantics\Platform\Sqlite\Statement\Schema\Drop::deriveStatement() packages/sql-semantics-sqlite/src/Statement/Schema/Drop.php:68
Type declarations 26
- type SqlSemantics\Platform\Sqlite\Model\Construction\Derivation packages/sql-semantics-sqlite/src/Model/Construction/Derivation.php:182
- type SqlSemantics\Platform\Sqlite\Model\Construction\Derivation packages/sql-semantics-sqlite/src/Model/Construction/Derivation.php:190
- type SqlSemantics\Platform\Sqlite\Model\Statement\Fact\Facts packages/sql-semantics-sqlite/src/Model/Statement/Fact/Facts.php:105
- type SqlSemantics\Platform\Sqlite\Model\Statement\Relation packages/sql-semantics-sqlite/src/Model/Statement/Relation.php:26
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:48
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:66
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:80
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:92
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:130
- type SqlSemantics\Platform\Sqlite\Rules\Definition\AlterationProblems packages/sql-semantics-sqlite/src/Rules/Definition/AlterationProblems.php:143
- type SqlSemantics\Platform\Sqlite\Rules\Definition\RelationKinds packages/sql-semantics-sqlite/src/Rules/Definition/RelationKinds.php:34
- type SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:78
- type SqlSemantics\Platform\Sqlite\Rules\Definition\TableShapes packages/sql-semantics-sqlite/src/Rules/Definition/TableShapes.php:96
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\JoinedInput packages/sql-semantics-sqlite/src/Rules/Resolution/JoinedInput.php:21
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:43
- type SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:74
- type SqlSemantics\Platform\Sqlite\Statement\Mutation\MutationTarget packages/sql-semantics-sqlite/src/Statement/Mutation/MutationTarget.php:67
- type SqlSemantics\Platform\Sqlite\Statement\Relation\DerivedQuery packages/sql-semantics-sqlite/src/Statement/Relation/DerivedQuery.php:51
- type SqlSemantics\Platform\Sqlite\Statement\Relation\JoinChain packages/sql-semantics-sqlite/src/Statement/Relation/JoinChain.php:64
- type SqlSemantics\Platform\Sqlite\Statement\Relation\NestedInput packages/sql-semantics-sqlite/src/Statement/Relation/NestedInput.php:51
- type SqlSemantics\Platform\Sqlite\Statement\Relation\TableCall packages/sql-semantics-sqlite/src/Statement/Relation/TableCall.php:65
- type SqlSemantics\Platform\Sqlite\Statement\Relation\TableInput packages/sql-semantics-sqlite/src/Statement/Relation/TableInput.php:68
- type SqlSemantics\Platform\Sqlite\Statement\Schema\AlterAddColumn packages/sql-semantics-sqlite/src/Statement/Schema/AlterAddColumn.php:79
- type SqlSemantics\Platform\Sqlite\Statement\Schema\CreateIndex packages/sql-semantics-sqlite/src/Statement/Schema/CreateIndex.php:121
- type SqlSemantics\Platform\Sqlite\Statement\Schema\CreateTable packages/sql-semantics-sqlite/src/Statement/Schema/CreateTable.php:147
- type SqlSemantics\Platform\Sqlite\Statement\Trigger\TriggerTable packages/sql-semantics-sqlite/src/Statement/Trigger/TriggerTable.php:60