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

Lowers the options of EXPLAIN in MySQL 8.0 and later.

Rule: MYSQL-EXPLAIN-OPTION-LOWERING-001. Scope: opt_explain_options, opt_explain_format, opt_explain_into, opt_explain_for_schema. The format is a name the server compares without regard to case; INTO names a user variable; FOR DATABASE names a database. Terminates: unit productions over strict subtrees. Source: https://dev.mysql.com/doc/refman/8.4/en/explain.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function options(Node $options): array{Name|null, bool, UserVariable|null}

Lowers a node of opt_explain_options into the format, ANALYZE and the variable of INTO.

Parameters

$optionsNode

Returns

array{Name|null, bool, UserVariable|null}

Throws

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

Lowers a node of opt_explain_for_schema.

Parameters

$databaseNode

Returns

Throws

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

Private surface 1§

Implementation details, listed for orientation only.

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 2
Method calls 2