final class ExplicitTable
    implements Statement, Query, NamedRelation
    uses Snapshot
Public API: explicitly declared with @visibility public.

The TABLE statement: every row and column of one table (MySQL 8.0.19 and later).

It is both the query and the occurrence of the table it reads.

Rule: MYSQL-EXPLICIT-TABLE-001. The name resolves like a table reference (MYSQL-TABLE-SHAPES-001); the output fields are the columns of the table in order. Source: https://dev.mysql.com/doc/refman/8.4/en/table.html. Status: Implemented.

Reading the table of a TABLE statementdoctest
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('TABLE shop.t');
    [$query->statement->name()->schema?->value, $query->statement->name()->name->value] // => ['shop', 't']

Properties§

public QualifiedName $table

Methods§

public function __construct(public QualifiedName $table)

Parameters

$tableQualifiedNameThe table name with its optional database
Calls 1
public function name(): QualifiedName

Answers the table name.

public function alias(): ?Name

Answers no correlation name: the TABLE statement takes none.

Returns

public function deriveStatement(Derivation $derivation): void

Derives the statement as a statement root and records its rows as the output.

Parameters

$derivationDerivation
Calls 3
public function deriveQuery(Derivation $derivation, Environment $outer): QueryFact

Resolves the table and answers its columns as the output.

Parameters

$derivationDerivation
$outerEnvironment

Returns

Calls 3
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Resolves the name and derives the row shape of the occurrence.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 2
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 4

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 4
Other tests reaching this symbol 2

Relations§

Instantiated in 1
Type declarations 2