classReferentialAction
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.
$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§
public ReferenceEvent $eventpublic ReferenceOption $optionMethods§
public function __construct(public ReferenceEvent $event, public ReferenceOption $option)Parameters
$event | ReferenceEvent | The change of the parent row |
$option | ReferenceOption | What happens to the child rows |
public function render(Output $out): voidWrites the clause.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 38
- function-call
explodeline 38
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.