enumReferentialAction
enum ReferentialAction: string
What a foreign key says should happen when the row it points at moves.
Only CASCADE and SET NULL let the statement stand; the rest say the parent was not free to move, so the statement is refused.
Cases§
case NoAction = 'NO ACTION'case Restrict = 'RESTRICT'case Cascade = 'CASCADE'case SetNull = 'SET NULL'case SetDefault = 'SET DEFAULT'Test cases 33§
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 32
CascadingShop::registrycallsForeignKeyDefinitionTest::testCarriesCompositeReferenceAndActionscallsForeignKeyCascadeTest::testApplyActionCarriesTheNewValueWhereTheActionSaysToCascadecallsForeignKeyCascadeTest::testApplyActionRefusesTheStatementWhereTheActionForbidsItcallsForeignKeyCascadeTest::testApplyActionSetsTheKeyToNullWhereTheActionSaysTocallsForeignKeyCascadeTest::testCarryDeleteDropsEveryChildThatWasHoldingTheKeyWhereTheActionCascadescallsForeignKeyCascadeTest::testCarryDeleteSetsTheKeyToNullWhereTheActionSaysToRatherThanDroppingTheRowcallsForeignKeyCascadeTest::testCarryUpdateWritesTheNewKeyIntoEveryChildThatWasHoldingTheOldOnecallsForeignKeyCascadeTest::testOfCarriesTheNewKeyToTheChildrenOfAnUpdatedParentcallsForeignKeyCascadeTest::testOfDeletesTheChildrenOfADeletedParentWhereTheActionSaysToCascadecallsForeignKeyCascadeTest::testOfFollowsNothingThroughAKeyWhoseEndsDisagreecallsForeignKeyCascadeTest::testOfLeavesTheChildrenAloneWhileAnotherParentRowHoldsTheKeyUpcallsReferentialIntegrityEnforcerTest::testCascadeNormalizesSparseChildRowIndexescallsReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testCompositePrimaryKeyUpdateCascadesOnlyMatchingChildrencallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testEmptySelfReferentialCascadeTerminatesWithoutSyntheticEventscallsReferentialIntegrityEnforcerTest::testFallbackContinuesAfterIdentityMatchedRowcallsReferentialIntegrityEnforcerTest::testFallbackTransitionPropagatesUpdateAndDeleteFromOneTablecallsReferentialIntegrityEnforcerTest::testIdentityTransitionSkipsIncompleteChangeAndProcessesFollowingChangecallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescallsReferentialIntegrityEnforcerTest::testMissingReferencedValuesDoNotStopLaterUpdateOrDeleteCascadescallsReferentialIntegrityEnforcerTest::testMultiTruncateCascadesFromEveryChangedParentTablecallsReferentialIntegrityEnforcerTest::testPrimaryKeyUpdateCascadesThroughOriginalRowIdentitycallsReferentialIntegrityEnforcerTest::testRetainedOldKeyDoesNotStopFollowingUpdateCascadecallsReferentialIntegrityEnforcerTest::testSynchronizeCascadesDeletedRowscallsReferentialIntegrityEnforcerTest::testUpdateCascadeCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testUpdateDoesNotCascadeWhileOldParentKeyStillExistscalls
Relations§
Constant reads 7
- class-const packages/ztd-query-core/src/Compatibility/ClassAliases.php packages/ztd-query-core/src/Compatibility/ClassAliases.php:34
- class-const ZtdQuery\Schema\Key\ForeignKeyDefinition::__construct() packages/ztd-query-core/src/Schema/Key/ForeignKeyDefinition.php:20
- class-const ZtdQuery\Schema\Key\ForeignKeyDefinition::__construct() packages/ztd-query-core/src/Schema/Key/ForeignKeyDefinition.php:21
- class-const ZtdQuery\Shadow\ForeignKeyCascade::carryDelete() packages/ztd-query-core/src/Shadow/ForeignKeyCascade.php:159
- class-const ZtdQuery\Shadow\ForeignKeyCascade::applyAction() packages/ztd-query-core/src/Shadow/ForeignKeyCascade.php:190
- class-const ZtdQuery\Shadow\ForeignKeyCascade::applyAction() packages/ztd-query-core/src/Shadow/ForeignKeyCascade.php:190
- class-const ZtdQuery\Shadow\ForeignKeyCascade::applyAction() packages/ztd-query-core/src/Shadow/ForeignKeyCascade.php:201
Type declarations 3
- type ZtdQuery\Schema\Key\ForeignKeyDefinition packages/ztd-query-core/src/Schema/Key/ForeignKeyDefinition.php:20
- type ZtdQuery\Schema\Key\ForeignKeyDefinition packages/ztd-query-core/src/Schema/Key/ForeignKeyDefinition.php:21
- type ZtdQuery\Shadow\ForeignKeyCascade packages/ztd-query-core/src/Shadow/ForeignKeyCascade.php:187