enumReferenceEvent
enum ReferenceEvent: string
Public API: explicitly declared with
@visibility public.The change of a parent key a foreign key action is written for.
The grammar also accepts ON INSERT; SQLite reads it and attaches no action to it. Source: https://sqlite.org/foreignkeys.html#fk_actions.
$create = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('CREATE TABLE c (p REFERENCES parent ON DELETE CASCADE)');
$create->statement->columns[0]->constraints[0]->arguments[0]->event // => \SqlSemantics\Platform\Sqlite\Statement\Schema\Reference\ReferenceEvent::DeleteCases§
case Insert = 'INSERT'case Delete = 'DELETE'case Update = 'UPDATE'Test cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 6
ForeignKeyRuleTest::testArgumentLowersEveryEventAndReactioncallsForeignKeyRuleTest::testArgumentsKeepTheirWrittenOrdercallsForeignKeyClauseTest::testReactionIsNoActionWhenNoneIsWrittencallsForeignKeyClauseTest::testReactionIsThatOfTheLastActionWrittenForTheEventcallsReferenceActionTest::testRenderWritesAnInsertEventTheGrammarAcceptscallsReferenceActionTest::testRenderWritesTheEventAndTheReactioncalls
Relations§
Constant reads 3
- class-const SqlSemantics\Platform\Sqlite\Lowering\Definition\ForeignKeyRule packages/sql-semantics-sqlite/src/Lowering/Definition/ForeignKeyRule.php:39
- class-const SqlSemantics\Platform\Sqlite\Lowering\Definition\ForeignKeyRule packages/sql-semantics-sqlite/src/Lowering/Definition/ForeignKeyRule.php:40
- class-const SqlSemantics\Platform\Sqlite\Lowering\Definition\ForeignKeyRule packages/sql-semantics-sqlite/src/Lowering/Definition/ForeignKeyRule.php:41
Type declarations 2
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Reference\ForeignKeyClause packages/sql-semantics-sqlite/src/Statement/Schema/Reference/ForeignKeyClause.php:66
- type SqlSemantics\Platform\Sqlite\Statement\Schema\Reference\ReferenceAction packages/sql-semantics-sqlite/src/Statement/Schema/Reference/ReferenceAction.php:32