final class TriggerTable
    implements Relation
    uses Snapshot
Public API: explicitly declared with @visibility public.

The table a trigger is created on.

Rule: MYSQL-TRIGGER-TABLE-001. The name resolves as a table name of the context (MYSQL-TABLE-SHAPES-001); its row is what NEW and OLD denote in the trigger body (MYSQL-TRIGGER-ROWS-001). Terminates: one lookup. Source: https://dev.mysql.com/doc/refman/8.4/en/create-trigger.html. Status: Implemented.

Reading the table of a triggerdoctest
$create = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE TRIGGER tr AFTER DELETE ON shop.t FOR EACH ROW SET @a = 1');
    [$create->statement->table->name->schema->value, $create->statement->table->name->name->value] // => ['shop', 't']

Properties§

Methods§

public function __construct(public QualifiedName $name)

Parameters

$nameQualifiedNameThe table name with its optional database
Calls 1
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFact

Resolves the table and answers its row.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 2
public function render(Output $out): void

Writes the table name.

Parameters

$outOutput
Test cases 1
Calls 3

Test cases 4§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 2

Relations§

Instantiated in 1
Type declarations 3