final class ReferentialAction
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One ON UPDATE or ON DELETE clause of a foreign key reference.

Source: https://dev.mysql.com/doc/refman/8.4/en/create-table-foreign-keys.html#foreign-key-referential-actions.

Reading a referential actiondoctest
$action = new \SqlSemantics\Platform\MySql\Statement\Table\Key\ReferentialAction(\SqlSemantics\Platform\MySql\Statement\Table\Key\ReferenceEvent::Delete, \SqlSemantics\Platform\MySql\Statement\Table\Key\ReferenceOption::Cascade);
    [$action->event->value, $action->option->value] // => ['DELETE', 'CASCADE']

Properties§

Methods§

public function __construct(public ReferenceEvent $event, public ReferenceOption $option)

Parameters

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

Writes the clause.

Parameters

$outOutput
Calls 2

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
Constant reads 1