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

The entry rules of the table definition family: the methods other families and the statement dispatcher call.

Rule: MYSQL-TABLE-DEFINITION-ENTRY-001. Scope: CREATE TABLE with columns, keys, constraints and options, CREATE INDEX, views, and the 5.7 statement PARSE_GCOL_EXPR. The method names, parameters and return types are fixed by the family plan; each method delegates to the rule classes of this family. Source: https://dev.mysql.com/doc/refman/8.4/en/create-table.html. Status: Implemented.

Properties§

public Lowering $lowering

Methods§

public function __construct(public Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function statement(Node $statement): Statement

Lowers a definition statement: a node of create_table_stmt, create_index_stmt, alter_view_stmt, drop_view_stmt or parse_gcol_expr.

Parameters

$statementNode

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Called from 1
Calls 11
public function definition(Form $form): Statement

Lowers a production of create, alter or drop that MYSQL-DEFINITION-ROUTES-001 routes to this family.

Parameters

$formForm

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Called from 1
Calls 10
public function createView(Node $tail, ?Node $prefix, ?Account $definer): Statement

Lowers CREATE VIEW: a node of view_tail, the node of view_replace_or_algorithm when one is written, and the definer.

Parameters

$tailNode
$prefix?Node
$definer?Account

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 2
public function tableElement(Node $element): TableElement

Lowers one column, index or constraint: a node of column_def, key_def, table_constraint_def, field_spec or table_element.

Parameters

$elementNode

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 2
public function tableElements(Node $list): list<TableElement>

Lowers a parenthesized element list: a node of create_field_list or table_element_list.

Parameters

$listNode

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 2
public function columnSpecification(Node $definition, ?Node $second = null): ColumnSpecification

Lowers a column definition without its name: a node of field_def with the node of opt_references when one follows, or the nodes of type and opt_attribute (5.6).

Parameters

$definitionNode
$second?Node

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 4
public function tableOptions(Node $options): list<TableOption>

Lowers table options: a node of create_table_options_space_separated, create_table_options or opt_create_table_options.

Parameters

$optionsNode

Returns

Throws

ImplementationGap When a production has no rule
Test cases 1
Calls 2
public function visible(Node $visibility): bool

Tells whether an index or column is declared VISIBLE: a node of visibility.

Parameters

$visibilityNode

Returns

bool

Throws

ImplementationGap When the production has no rule
Test cases 1
Calls 2
public function enforced(Node $enforcement): bool

Tells whether a check constraint is declared ENFORCED: a node of constraint_enforcement.

Parameters

$enforcementNode

Returns

bool

Throws

ImplementationGap When the production has no rule
Test cases 1
Calls 2

Test cases 9§

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

Dedicated tests 9

Relations§

Instantiated in 1
Method calls 2
Type declarations 1