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

Lowers trigger definitions.

Rule: SQLITE-TRIGGER-LOWER-001. Scope: trigger_decl, trigger_time, trigger_event, foreach_clause, when_clause, trigger_cmd_list, trigger_cmd, trnm, tridxby. The statements of the program keep their written order and are lowered into the same statement classes as outside a trigger. Terminates: the program is flattened iteratively. Source: https://sqlite.org/lang_createtrigger.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function create(Node $declaration, Node $program): CreateTrigger

Lowers a trigger definition from its declaration and its program.

Parameters

$declarationNode
$programNode

Throws

ImplementationGap When a production has no rule
Calls 7
public function timing(Node $time): ?TriggerTiming

Lowers a trigger_time.

Parameters

$timeNode

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 4
public function event(Node $event): array{TriggerEvent, list<Name>}

Lowers a trigger_event into the event and the columns of UPDATE OF.

Parameters

$eventNode

Returns

array{TriggerEvent, list<Name>}

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 4
public function when(Node $clause): ?Scalar

Lowers a when_clause: the condition, or null when the clause is absent.

Parameters

$clauseNode

Returns

Throws

ImplementationGap When the production has no rule
Called from 1
Calls 1

Lowers a trigger_cmd_list into the statements of the program in written order.

Parameters

$listNode

Throws

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

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

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 1
Type declarations 1