final class Targets
Restricted visibility: declared "@visibility SqlSemantics\Platform\MySql". Code outside that scope must not name this declaration.

Resolves the existing table a DROP, RENAME, TRUNCATE or ALTER TABLE names, and answers its facts.

Rule: MYSQL-CHANGE-TARGET-001. The name resolves by CORE-TABLE-LOOKUP-001 in the current database or the database written; common table expressions are not visible to these statements. A declared table contributes one slot per declared column, in order, each referring to the declaration, and an open shape when its column list is incomplete; an undeclared or conditionally resolved name contributes an open shape that names the missing declaration; a missing or conflicting name contributes an empty complete shape and is a diagnostic, except that a missing name under IF EXISTS resolves to AbsentTable (the server only adds a note). Two names denote the same table when their databases (the current one when none is written) and their names are equal under the context's relation name comparison. Precision: every slot of a declared table is a known type. Terminates: one pass over the columns. Source: https://dev.mysql.com/doc/refman/8.4/en/drop-table.html, https://dev.mysql.com/doc/refman/8.4/en/identifier-qualifiers.html. Status: Implemented.

Methods§

public function target(Derivation $derivation, QualifiedName $name): RelationFact

Resolves a table name and answers its facts.

Parameters

$derivationDerivation
$nameQualifiedName
Called from 8
Calls 7
public function optional(
    Derivation $derivation,
    QualifiedName $name,
    bool $ifExists,
): RelationFact

Resolves a table name that IF EXISTS allows to be absent.

Parameters

$derivationDerivation
$nameQualifiedName
$ifExistsbool
Called from 1
Calls 4

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 11
Method calls 13