classShowParseTree
final class ShowParseTree
implements Statement
uses Snapshot
@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.
(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 onlyProperties§
public Statement $statementMethods§
public function __construct(public Statement $statement)Parameters
$statement | Statement | The statement whose parse tree is requested |
public function deriveStatement(Derivation $derivation): voidInspects the statement and reports that a release build refuses the request.
Parameters
$derivation | Derivation |
Calls 4
- method-call Derivation::inspected() line 46
- method-call Derivation::report() line 47
- new UtilityMisuse line 47
- class-const UtilityRule::DebugOnly() line 47
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.