classProgramProblem
final class ProgramProblem
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A stored program statement MySQL rejects because it breaks a rule of the language.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE PROCEDURE p() LEAVE missing') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: LEAVE with no matching label: missingProperties§
public ProgramRule $rulepublic string|null $subject = nullMethods§
public function __construct(public ProgramRule $rule, public string|null $subject = null)Parameters
$rule | ProgramRule | The broken rule |
$subject | string|null | The name the problem is about; given exactly when the message of the rule names one |
Calls 2
- static-call Check::input() line 28
- function-call
str_containsline 28
public function message(): stringDescribes the broken rule in the words of the server.
Returns
stringTest cases 3
Calls 1
- function-call
str_replaceline 36
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
ProgramProblemTest::testARuleAboutANameWithoutSubjectIsRejectedcallsProgramProblemTest::testARuleWithoutNameWithASubjectIsRejectedcallsProgramProblemTest::testMessageKeepsTheSubjectVerbatimcallsProgramProblemTest::testMessageWritesTheServerTextOfARuleWithoutSubjectcallsProgramProblemTest::testMessageWritesTheSubjectIntoTheServerTextcallsProgramProblemTest::testProblemsWithTheSameRuleAndSubjectAreEqualcalls
Other tests reaching this symbol 10
ProgramFactsTest::testRoutineReportsAProgramProblemcallsTriggerAssignmentsTest::testCheckReportsAProgramProblemOfTheRulecallsGetDiagnosticsTest::testDeriveStatementReportsANameTargetOutsideAProgramcallsResignalTest::testDeriveStatementReportsTheBrokenRulecallsSignalTest::testDeriveStatementReportsTheBrokenRulecallsCreateEventTest::testDeriveStatementReportsANestedEventDefinitioncallsCreateFunctionTest::testDeriveStatementReportsADuplicateParametercallsCreateFunctionTest::testDeriveStatementReportsAMissingReturncallsCreateProcedureTest::testDeriveStatementReportsADuplicateParameterWhateverItsCasecallsCreateTriggerTest::testDeriveStatementReportsAnAssignmentToARowItMayNotChangecalls
Relations§
Instantiated in 37
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::ordered() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:97
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::ordered() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:100
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::distinct() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:112
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::handled() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:133
- new SqlSemantics\Platform\MySql\Rules\Routine\BlockFacts::variables() packages/sql-semantics-mysql/src/Rules/Routine/BlockFacts.php:153
- new SqlSemantics\Platform\MySql\Rules\Routine\ConditionFacts::value() packages/sql-semantics-mysql/src/Rules/Routine/ConditionFacts.php:50
- new SqlSemantics\Platform\MySql\Rules\Routine\ConditionFacts::value() packages/sql-semantics-mysql/src/Rules/Routine/ConditionFacts.php:53
- new SqlSemantics\Platform\MySql\Rules\Routine\ConditionFacts::value() packages/sql-semantics-mysql/src/Rules/Routine/ConditionFacts.php:56
- new SqlSemantics\Platform\MySql\Rules\Routine\ConditionFacts::signal() packages/sql-semantics-mysql/src/Rules/Routine/ConditionFacts.php:92
- new SqlSemantics\Platform\MySql\Rules\Routine\ConditionFacts::signal() packages/sql-semantics-mysql/src/Rules/Routine/ConditionFacts.php:97
- new SqlSemantics\Platform\MySql\Rules\Routine\CursorFacts::cursor() packages/sql-semantics-mysql/src/Rules/Routine/CursorFacts.php:34
- new SqlSemantics\Platform\MySql\Rules\Routine\CursorFacts::variables() packages/sql-semantics-mysql/src/Rules/Routine/CursorFacts.php:47
- new SqlSemantics\Platform\MySql\Rules\Routine\FlowFacts::jump() packages/sql-semantics-mysql/src/Rules/Routine/FlowFacts.php:71
- new SqlSemantics\Platform\MySql\Rules\Routine\FlowFacts::returned() packages/sql-semantics-mysql/src/Rules/Routine/FlowFacts.php:81
- new SqlSemantics\Platform\MySql\Rules\Routine\LabelFacts::enter() packages/sql-semantics-mysql/src/Rules/Routine/LabelFacts.php:33
- new SqlSemantics\Platform\MySql\Rules\Routine\LabelFacts::enter() packages/sql-semantics-mysql/src/Rules/Routine/LabelFacts.php:36
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramFacts::routine() packages/sql-semantics-mysql/src/Rules/Routine/ProgramFacts.php:73
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramFacts::routine() packages/sql-semantics-mysql/src/Rules/Routine/ProgramFacts.php:84
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:100
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:101
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:102
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:103
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:104
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:105
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:106
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:107
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:108
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:109
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::anywhere() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:110
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::function() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:121
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::function() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:122
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::function() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:123
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::function() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:124
- new SqlSemantics\Platform\MySql\Rules\Routine\ProgramRestrictions::function() packages/sql-semantics-mysql/src/Rules/Routine/ProgramRestrictions.php:125
- new SqlSemantics\Platform\MySql\Rules\Routine\TriggerAssignments::check() packages/sql-semantics-mysql/src/Rules/Routine/TriggerAssignments.php:51
- new SqlSemantics\Platform\MySql\Rules\Routine\TriggerAssignments::check() packages/sql-semantics-mysql/src/Rules/Routine/TriggerAssignments.php:53
- new SqlSemantics\Platform\MySql\Rules\Routine\TriggerAssignments::check() packages/sql-semantics-mysql/src/Rules/Routine/TriggerAssignments.php:54