classCommonTable
final class CommonTable
implements TableResolution
uses Snapshot
Public API: explicitly declared with
@visibility public.A relation name that denotes a common table expression of the same statement.
$query = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('WITH c AS (SELECT 1 AS a) SELECT a FROM c');
$query->facts->relation($query->statement->body->input())->table instanceof \SqlSemantics\Platform\Sqlite\Model\Statement\Reference\Table\CommonTable // => trueProperties§
public Node $definitionMethods§
Test cases 7§
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 5
DerivationTest::testTableResolvesTheNearestCommonTableBeforeTheContextcallsTableShapesTest::testFactCopiesTheShapeOfACommonTableAndLinksItsSlotscallsInTableTest::testDeriveScalarReadsACommonTablecallsWithQueryTest::testDeriveStatementRecordsTheOutputOfTheBodycallsTableInputTest::testDeriveRelationResolvesACommonTableToItsDefinitioncalls
Relations§
Instantiated in 1
Type checks 4
- instanceof SqlSemantics\Platform\Sqlite\Rules\Definition\Query\ExpressionAffinity::computing() packages/sql-semantics-sqlite/src/Rules/Definition/Query/ExpressionAffinity.php:171
- instanceof SqlSemantics\Platform\Sqlite\Rules\Resolution\TableShapes::fact() packages/sql-semantics-sqlite/src/Rules/Resolution/TableShapes.php:54
- instanceof SqlSemantics\Platform\Sqlite\Statement\Expression\Subquery\InTable::deriveScalar() packages/sql-semantics-sqlite/src/Statement/Expression/Subquery/InTable.php:82
- instanceof SqlSemantics\Platform\Sqlite\Statement\Relation\TableCall::deriveRelation() packages/sql-semantics-sqlite/src/Statement/Relation/TableCall.php:71