enumMisuseRule
enum MisuseRule: string
Public API: explicitly declared with
@visibility public.The rules of MySQL a grammatical query can break without naming a missing object.
Each case holds the message of the server error it corresponds to. Source: https://dev.mysql.com/doc/mysql-errors/8.4/en/server-error-reference.html.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT *');
$query->facts->diagnostics[0]->rule // => \SqlSemantics\Platform\MySql\Statement\Query\Problem\MisuseRule::StarWithoutTablesCases§
case StarWithoutTables = 'No tables used'case DuplicateAlias = 'Not unique table/alias'case DerivedWithoutAlias = 'Every derived table must have its own alias'case TableFunctionWithoutAlias = 'Every table function must have an alias'case DuplicateCommonTable = 'Not unique table/alias in WITH'case RecursiveWithoutAnchor = 'Recursive Common Table Expression should contain a UNION whose first operand d…case DuplicateColumn = 'Duplicate column name'case DuplicateWindow = 'Window name is defined more than once'case UnknownWindow = 'Window name is not defined'case UnknownLockedTable = 'Table in the locking clause is not in the query'case AmbiguousJoinColumn = 'Column in from clause is ambiguous'Test cases 10§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 9
DerivedShapesTest::testUniqueReportsADuplicateNamecallsJoiningTest::testLocateReportsAColumnSelectedTwicecallsTailFactsTest::testDeriveReportsAnUnknownLockedTablecallsWindowReferencesTest::testCheckReportsAWindowNameTheBlockDoesNotDefinecallsWindowDefinitionTest::testANameDefinedTwiceIsReportedcallsRecursiveReferenceTest::testAReferenceWithoutAnchorDependsOnTheMissingPartcallsWithTest::testBindReportsATableDefinedTwicecallsDerivedTableTest::testDeriveRelationReportsAMissingAliascallsJsonTableTest::testDeriveRelationReportsAMissingAliascalls
Relations§
Constant reads 12
- class-const SqlSemantics\Platform\MySql\Rules\Dml\InsertFacts::duplicates() packages/sql-semantics-mysql/src/Rules/Dml/InsertFacts.php:187
- class-const SqlSemantics\Platform\MySql\Rules\Query\CommonTables::bind() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:62
- class-const SqlSemantics\Platform\MySql\Rules\Query\CommonTables::bind() packages/sql-semantics-mysql/src/Rules/Query/CommonTables.php:69
- class-const SqlSemantics\Platform\MySql\Rules\Query\DerivedShapes::unique() packages/sql-semantics-mysql/src/Rules/Query/DerivedShapes.php:91
- class-const SqlSemantics\Platform\MySql\Rules\Query\From\Joining::locate() packages/sql-semantics-mysql/src/Rules/Query/From/Joining.php:131
- class-const SqlSemantics\Platform\MySql\Rules\Query\Projection::star() packages/sql-semantics-mysql/src/Rules/Query/Projection.php:81
- class-const SqlSemantics\Platform\MySql\Rules\Query\SelectFacts::windows() packages/sql-semantics-mysql/src/Rules/Query/SelectFacts.php:106
- class-const SqlSemantics\Platform\MySql\Rules\Query\TailFacts::derive() packages/sql-semantics-mysql/src/Rules/Query/TailFacts.php:63
- class-const SqlSemantics\Platform\MySql\Rules\Query\WindowReferences::check() packages/sql-semantics-mysql/src/Rules/Query/WindowReferences.php:52
- class-const SqlSemantics\Platform\MySql\Statement\Dml\Insert\RowAlias::deriveRelation() packages/sql-semantics-mysql/src/Statement/Dml/Insert/RowAlias.php:89
- class-const SqlSemantics\Platform\MySql\Statement\Relation\DerivedTable::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/DerivedTable.php:68
- class-const SqlSemantics\Platform\MySql\Statement\Relation\JsonTable::deriveRelation() packages/sql-semantics-mysql/src/Statement/Relation/JsonTable.php:68