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

Lowers the clauses SHOW statements share.

Rule: MYSQL-SHOW-CLAUSE-LOWERING-001. Scope: wild_and_where (5.6), opt_wild_or_where, opt_wild_or_where_for_show (5.7), opt_db, from_or_in, opt_full, opt_show_cmd_type, opt_extended, opt_var_type, engine_or_all, binlog_in, opt_binlog_in, binlog_from, opt_profile_defs, profile_defs, profile_def, opt_profile_args, opt_for_query. FROM and IN are the same keyword and LOCAL is the scope SESSION (UtilityNoise). Constructs: ShowLike, ShowWhere, ShowListing, ProfileSection, VariableScope and the leaf values. Terminates: the profile list spine is flattened iteratively. Source: https://dev.mysql.com/doc/refman/8.4/en/show.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function filter(Node $filter): ShowLike|ShowWhere|null

Lowers a LIKE or WHERE clause: a node of wild_and_where, opt_wild_or_where or opt_wild_or_where_for_show.

Parameters

$filterNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 26
Calls 8
public function database(Node $database): ?Name

Lowers the database clause: a node of opt_db.

Parameters

$databaseNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 14
Calls 3
public function listing(Node $listing): ?ShowListing

Lowers the FULL and EXTENDED keywords: a node of opt_full or opt_show_cmd_type.

Parameters

$listingNode

Returns

Throws

ImplementationGap When a production has no rule
Called from 8
Calls 4
public function extended(Node $extended): bool

Lowers the optional EXTENDED keyword of SHOW INDEX: a node of opt_extended.

Parameters

$extendedNode

Returns

bool

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 2

Private surface 7§

Implementation details, listed for orientation only.

private const UNFILTERED = ['wild_and_where:' => true, 'opt_wild_or_where:' => true, 'opt_wild_or_where_fo…
private const LIKE = ['wild_and_where: LIKE TEXT_STRING_sys' => true, 'opt_wild_or_where: LIKE TEXT_…
private const WHERE = ['wild_and_where: WHERE expr' => true, 'opt_wild_or_where: WHERE expr' => true,…
private const LISTINGS = ['opt_full:' => null, 'opt_full: FULL' => \SqlSemantics\Platform\MySql\Statemen…
private const SCOPES = ['opt_var_type:' => null, 'opt_var_type: GLOBAL_SYM' => \SqlSemantics\Platform\…
private const SECTIONS = ['profile_def: CPU_SYM' => \SqlSemantics\Platform\MySql\Statement\Utility\Show\…
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 10
Method calls 74