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

Derives the rows EXPLAIN returns, from its format and options.

Rule: MYSQL-EXPLAIN-ROWS-001. Format names are compared without regard to case. TRADITIONAL returns one row per table of the plan with the columns of the layout of MYSQL-SHOW-ROWS-001 (in MySQL 5.6 EXTENDED adds filtered and PARTITIONS adds partitions); JSON, and TREE from MySQL 8.0 on, return one column EXPLAIN. Without FORMAT, MySQL 5.x uses TRADITIONAL and MySQL 8.0 and later the format of the explain_format system variable, so the shape depends on the session. EXPLAIN ANALYZE returns one EXPLAIN column in every format it accepts and refuses TRADITIONAL. EXPLAIN INTO (8.1 and later) stores the JSON plan in a user variable, returns no rows and requires FORMAT=JSON. Another format name is refused (ER_UNKNOWN_EXPLAIN_FORMAT). A refused statement returns no rows. Terminates: a fixed table. Source: https://dev.mysql.com/doc/refman/8.4/en/explain.html, https://dev.mysql.com/doc/refman/8.4/en/explain-output.html, https://dev.mysql.com/doc/refman/5.6/en/explain-extended.html. Status: Implemented.

Methods§

public function refusal(
    GrammarRelease $release,
    ?string $format,
    bool $analyze,
    bool $into,
): ?UtilityRule

Answers the rule a format and the options break, or null when the server accepts them.

Parameters

$releaseGrammarRelease
$format?string
$analyzebool
$intobool

Returns

Test cases 1
Called from 1
Calls 5
public function rows(
    Derivation $derivation,
    ?string $format,
    bool $analyze,
    ?ExplainModifier $modifier,
): void

Test cases 2§

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

Dedicated tests 2

Relations§

Instantiated in 2
Method calls 2