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

Lowers CREATE TRIGGER.

Rule: MYSQL-TRIGGER-LOWERING-001. Scope: trigger_tail, trg_action_time, trg_event, trigger_follows_precedes_clause, trigger_action_order. The symbols of the tail are read by rule name, so one reading serves the layouts of every release. Constructs: CreateTrigger, TriggerTable, TriggerOrder. Terminates: every child is a strict subtree. Source: https://dev.mysql.com/doc/refman/8.4/en/create-trigger.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function order(Node $clause): ?TriggerOrder

Lowers the FOLLOWS or PRECEDES clause: a node of trigger_follows_precedes_clause; an absent clause is null.

Parameters

$clauseNode

Returns

Throws

ImplementationGap When a production has no rule
Test cases 2
Called from 1
Calls 4

Private surface 5§

Implementation details, listed for orientation only.

private const TAILS = ['trigger_tail: TRIGGER_SYM remember_name sp_name trg_action_time trg_event ON …
private const TIMES = ['trg_action_time: BEFORE_SYM' => \SqlSemantics\Platform\MySql\Statement\Routin…
private const EVENTS = ['trg_event: INSERT' => \SqlSemantics\Platform\MySql\Statement\Routine\Trigger\…
private const PLACEMENTS = ['trigger_action_order: FOLLOWS_SYM' => \SqlSemantics\Platform\MySql\Statement\…
private Lowering $lowering

Test cases 3§

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

Dedicated tests 3

Relations§

Instantiated in 1
Method calls 1