final class ShowParseTree
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

SHOW PARSE_TREE: the parse tree of a statement, in debug builds of the server (MySQL 8.1 and later).

Rule: MYSQL-SHOW-PARSE-TREE-001. The grammar reads the statement; a release build of the server refuses it as a syntax error, so the statement is a diagnostic (UtilityRule::DebugOnly) and its rows are not modeled. The wrapped statement is inspected, not run: its parts receive their facts, its rows and declarations are discarded. Terminates: the wrapped statement is a strict subtree. Source: the show_parse_tree_stmt rule of sql/sql_yacc.yy (8.1), checked against a release build of 8.4.7. Status: Implemented.

Reading the inspected statementdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('SHOW PARSE_TREE SELECT 1') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: The statement is available in debug builds of the server only

Properties§

public Statement $statement

Methods§

public function __construct(public Statement $statement)

Parameters

$statementStatementThe statement whose parse tree is requested
public function deriveStatement(Derivation $derivation): void

Inspects the statement and reports that a release build refuses the request.

Parameters

$derivationDerivation
Calls 4
public function render(Output $out): void

Writes the statement.

Parameters

$outOutput
Calls 1

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 1