classFollowedConstraint
final class FollowedConstraint
One constraint being followed out from a parent, and what to say of it.
Following a key needs the constraint itself, the table that holds it, and the statement being simulated: the first two say what to do, and all three say what to tell the caller when the action forbids the statement. They travel together for the whole of one cascade, so they are one thing.
Properties§
public string $childTablepublic string $constraintNamepublic ForeignKeyDefinition $foreignKeypublic string $sqlMethods§
public function __construct(
public string $childTable,
public string $constraintName,
public ForeignKeyDefinition $foreignKey,
public string $sql,
)Parameters
$childTable | string | Table holding the key |
$constraintName | string | Constraint being followed, as the schema names it |
$foreignKey | ForeignKeyDefinition | Constraint being followed |
$sql | string | Statement being simulated |
Test cases 1
Test cases 10§
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 9
ForeignKeyCascadeTest::testApplyActionCarriesTheNewValueWhereTheActionSaysToCascadecallsForeignKeyCascadeTest::testApplyActionRefusesTheStatementWhereTheActionForbidsItcallsForeignKeyCascadeTest::testApplyActionSetsTheKeyToNullWhereTheActionSaysTocallsForeignKeyCascadeTest::testCarryDeleteDropsEveryChildThatWasHoldingTheKeyWhereTheActionCascadescallsForeignKeyCascadeTest::testCarryDeleteReachesNothingWhereTheParentTableStillHoldsTheKeycallsForeignKeyCascadeTest::testCarryDeleteSetsTheKeyToNullWhereTheActionSaysToRatherThanDroppingTheRowcallsForeignKeyCascadeTest::testCarryUpdateReachesNothingWhereTheParentTableStillHoldsTheOldKeycallsForeignKeyCascadeTest::testCarryUpdateWritesTheNewKeyIntoEveryChildThatWasHoldingTheOldOnecallsReferentialIntegrityEnforcerTestcalls