classMisuse
final class Misuse
implements Diagnostic
uses Snapshot
Public API: explicitly declared with
@visibility public.A query MySQL rejects because it breaks a rule of the language.
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT *') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: No tables usedProperties§
public MisuseRule $ruleMethods§
public function __construct(public MisuseRule $rule)Parameters
$rule | MisuseRule | The broken rule |
public function message(): stringDescribes the broken rule in the words of the server.
Returns
stringTest cases 12§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
MisuseTestcalls
Other tests reaching this symbol 11
DerivedShapesTest::testUniqueReportsADuplicateNamecallsJoiningTest::testLocateReportsAColumnSelectedTwicecallsProjectionTest::testStarReportsAStarWithoutTablescallsSelectFactsTest::testWindowsReportsANameDefinedTwicecallsTailFactsTest::testDeriveReportsAnUnknownLockedTablecallsWindowReferencesTest::testCheckReportsAWindowNameTheBlockDoesNotDefinecallsWindowDefinitionTest::testANameDefinedTwiceIsReportedcallsRecursiveReferenceTest::testAReferenceWithoutAnchorDependsOnTheMissingPartcallsWithTest::testBindReportsATableDefinedTwicecallsDerivedTableTest::testDeriveRelationReportsAMissingAliascallsJsonTableTest::testDeriveRelationReportsAMissingAliascalls
Relations§
Instantiated in 12
- new SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts::duplicates() packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:187
- new SqlSemantics\Platform\MySql\Rules\Query\CommonTables::bind() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:62
- new SqlSemantics\Platform\MySql\Rules\Query\CommonTables::bind() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:69
- new SqlSemantics\Platform\MySql\Rules\Query\DerivedShapes::unique() packages/sql-semantics-mysql/src/Rules/Query/DerivedShapes.php:91
- new SqlSemantics\Platform\MySql\Rules\Query\From\Joining::locate() packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:131
- new SqlSemantics\Platform\MySql\Rules\Query\Projection::star() packages/sql-semantics-mysql/src/Rules/Query/Projection.php:81
- new SqlSemantics\Platform\MySql\Rules\Query\SelectFacts::windows() packages/sql-semantics-mysql/src/Rules/Query/SelectFacts.php:106
- new SqlSemantics\Platform\MySql\Rules\Query\TailFacts::derive() packages/sql-semantics-mysql/src/Rules/Query/TailFacts.php:63
- new SqlSemantics\Platform\MySql\Rules\Query\WindowReferences::check() packages/sql-semantics-mysql/src/Rules/Query/WindowReferences.php:52
- new SqlSemantics\Platform\MySql\Statement\Dml\Insert\RowAlias::deriveRelation() packages/sql-semantics-mysql/src/Statement/Dml/Insert/RowAlias.php:89
- new SqlSemantics\Platform\MySql\Statement\Relation\DerivedTable::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/DerivedTable.php:68
- new SqlSemantics\Platform\MySql\Statement\Relation\JsonTable::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/JsonTable.php:68