classTriggerTable
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.
$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§
public QualifiedName $nameMethods§
public function __construct(public QualifiedName $name)Parameters
$name | QualifiedName | The table name with its optional database |
Calls 1
- static-call Check::input() line 42
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactResolves the table and answers its row.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 2
- method-call TableShapes::named() line 50
- new TableShapes line 50
public function render(Output $out): voidWrites the table name.
Parameters
$out | Output |
Test cases 1
Calls 3
- method-call ProgramNames::qualified() line 58
- new ProgramNames line 58
- class-const NameUse::Relation() line 58
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
- type SqlSemantics\Platform\MySql\Rules\Routine\ProgramFacts packages/sql-semantics-mysql/src/Rules/Routine/ProgramFacts.php:91
- type SqlSemantics\Platform\MySql\Rules\Routine\RowAliases packages/sql-semantics-mysql/src/Rules/Routine/RowAliases.php:37
- type SqlSemantics\Platform\MySql\Statement\Routine\CreateTrigger packages/sql-semantics-mysql/src/Statement/Routine/CreateTrigger.php:61