final class ReferenceAction
    implements ReferenceArgument
    uses Snapshot
Public API: explicitly declared with @visibility public.

An ON DELETE, ON UPDATE or ON INSERT clause of a foreign key.

Rule: SQLITE-FK-ACTION-001. The reaction applies to the child rows when the parent key is deleted or updated. An ON INSERT clause is grammatical and has no effect. Source: https://sqlite.org/foreignkeys.html#fk_actions. Status: Implemented.

Reading a foreign key actiondoctest
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE c (p REFERENCES parent ON DELETE NO ACTION)');
    $action = $create->statement->columns[0]->constraints[0]->arguments[0];
    [$action->event->value, $action->reaction->value] // => ['DELETE', 'NO ACTION']

Properties§

public ReferenceReaction $reaction

Methods§

public function __construct(public ReferenceEvent $event, public ReferenceReaction $reaction)

Parameters

$eventReferenceEventThe change of the parent key
$reactionReferenceReactionWhat happens to the child rows
public function render(Output $out): void

Test cases 5§

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 3

Relations§

Instantiated in 1
Type checks 1