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

Lowers the parts of a named table reference shared by every grammar generation.

Rule: MYSQL-TABLE-PARTS-001. Scope: single_table and the 5.x table_factor of a named table, opt_use_partition, use_partition, using_list, opt_table_alias, table_alias, opt_key_definition, opt_index_hints_list, index_hints_list, index_hint_definition, index_hint_type, index_hint_clause, opt_key_usage_list, key_usage_list, key_usage_element, opt_derived_column_list, simple_ident_list, opt_tablesample_clause, sampling_method, sampling_percentage. KEY and INDEX in an index hint are synonyms (the writer emits INDEX); PRIMARY names the primary key. Constructs: TableReference, IndexHint, PrimaryIndex, TableSample. Terminates: lists are flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/join.html, https://dev.mysql.com/doc/refman/8.4/en/index-hints.html, https://dev.mysql.com/doc/refman/8.4/en/partitioning-selection.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function hints(Node $list): list<IndexHint>

Lowers the index hints of a table in written order.

Parameters

$listNode

Returns

list<IndexHint>

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 5
public function hint(Node $definition): IndexHint
public function sample(Node $clause): ?TableSample

Private surface 3§

Implementation details, listed for orientation only.

private const TABLES = ['single_table: table_ident opt_use_partition opt_table_alias opt_key_definitio…
private const SCOPES = ['index_hint_clause:' => null, 'index_hint_clause: FOR_SYM JOIN_SYM' => \SqlSem…
private Lowering $lowering

Test cases 1§

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

Dedicated tests 1

Relations§

Instantiated in 16
Method calls 18