final class ElementFacts
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Derives the facts inside table elements, column specifications and table options, for CREATE TABLE and ALTER TABLE.

Rule: MYSQL-ELEMENT-FACTS-001. The expressions of an element are derived at the position the caller gives, whose only visible relation is the table being defined or changed (MYSQL-DEFINITION-SCOPE-001). The parent table of a REFERENCES clause is resolved and recorded as a table use (MYSQL-REFERENCES-001). Table options hold no expression and no resolvable name: the tables of a MERGE UNION option are named, not read, when the table is defined. Terminates: one pass over the element. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html, https://dev.mysql.com/doc/refman/8.4/en/alter-table.html. Status: Implemented.

Methods§

public function element(
    TableElement $element,
    Derivation $derivation,
    Environment $scope,
    Table|null $defined = null,
    QualifiedName|null $definedName = null,
): void
public function specification(
    ColumnSpecification $specification,
    Derivation $derivation,
    Environment $scope,
): void

Derives a column specification held by an ALTER TABLE.

Parameters

$specificationColumnSpecification
$derivationDerivation
$scopeEnvironment
Test cases 1
Calls 2
public function options(list<TableOption> $options, Derivation $derivation): void
public function declaration(ColumnDefinition $column): Column

Answers the column declaration a column definition requests, as CREATE TABLE declares it without a table-level primary key.

Parameters

Returns

Test cases 1
Called from 1
Calls 2

Test cases 5§

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

Dedicated tests 5

Relations§

Instantiated in 7
Method calls 7