classUtilityMisuse
final class UtilityMisuse
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A rule of SET, SHOW or EXPLAIN the statement breaks, which the server would refuse.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('EXPLAIN FORMAT = yaml SELECT 1') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: Unknown EXPLAIN format nameProperties§
public UtilityRule $ruleMethods§
public function __construct(public UtilityRule $rule)Parameters
$rule | UtilityRule | The broken rule |
public function message(): stringDescribes the broken rule in the words of the server.
Returns
stringTest cases 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 5
- new SqlSemantics\Platform\MySql\Rules\Utility\ExplainFacts::derive() packages/sql-semantics-mysql/src/Rules/Utility/ExplainFacts.php:51
- new SqlSemantics\Platform\MySql\Statement\Utility\Set\NamesExpression::deriveItem() packages/sql-semantics-mysql/src/Statement/Utility/Set/NamesExpression.php:49
- new SqlSemantics\Platform\MySql\Statement\Utility\Show\Program\ShowFunctionCode::deriveStatement() packages/sql-semantics-mysql/src/Statement/Utility/Show/Program/ShowFunctionCode.php:51
- new SqlSemantics\Platform\MySql\Statement\Utility\Show\Program\ShowProcedureCode::deriveStatement() packages/sql-semantics-mysql/src/Statement/Utility/Show/Program/ShowProcedureCode.php:51
- new SqlSemantics\Platform\MySql\Statement\Utility\Show\ShowParseTree::deriveStatement() packages/sql-semantics-mysql/src/Statement/Utility/Show/ShowParseTree.php:47