classDeleteMutation
final class DeleteMutation
implements DataMutation
Applies DELETE result rows to the shadow store.
Methods§
public function __construct(string $tableName, array<int, string> $primaryKeys)Parameters
$tableName | string | |
$primaryKeys | array<int, string> |
Test cases 9
DeleteMutationTest::testApplyRemovesMultipleRowscoversDeleteMutationTest::testApplyRemovesRowsByPrimaryKeycoversDeleteMutationTest::testApplyWithCompositePrimaryKeycoversDeleteMutationTest::testApplyWithEmptyRowsDoesNothingcoversDeleteMutationTest::testApplyWithNonExistentRowDoesNothingcoversDeleteMutationTest::testTableNameReturnsTableNamecoversShadowMutationTest::testDeleteDecreasesRowCountcoversShadowMutationTest::testDeleteOnEmptyTablecoversShadowMutationTest::testMutationTableIsolationcovers
public function apply(ShadowStore $store, array $rows): void{@inheritDoc}
Parameters
$store | ShadowStore | |
$rows | array |
Test cases 17
MutationContractTest::testDeleteDecreasesRowCountcallsMutationContractTest::testDeleteOnEmptyTablecallsMutationContractTest::testMutationTableIsolationcallsDeleteMutationTest::testApplyRemovesMultipleRowscovers and callsDeleteMutationTest::testApplyRemovesRowsByPrimaryKeycovers and callsDeleteMutationTest::testApplyWithCompositePrimaryKeycovers and callsDeleteMutationTest::testApplyWithEmptyRowsDoesNothingcovers and callsDeleteMutationTest::testApplyWithNonExistentRowDoesNothingcovers and callsShadowMutationTest::testDeleteDecreasesRowCountcoversShadowMutationTest::testDeleteOnEmptyTablecoversShadowMutationTest::testMutationTableIsolationcoversReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescalls
Calls 1
- method-call ShadowStore::delete() line 45
public function tableName(): string{@inheritDoc}
Returns
stringTest cases 1
DeleteMutationTest::testTableNameReturnsTableNamecovers and calls
Private surface 2§
Implementation details, listed for orientation only.
private string $tableNameprivate array<int, string> $primaryKeysTest cases 29§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
DeleteMutationTest::testApplyRemovesMultipleRowscovers and callsDeleteMutationTest::testApplyRemovesRowsByPrimaryKeycovers and callsDeleteMutationTest::testApplyWithCompositePrimaryKeycovers and callsDeleteMutationTest::testApplyWithEmptyRowsDoesNothingcovers and callsDeleteMutationTest::testApplyWithNonExistentRowDoesNothingcovers and callsDeleteMutationTest::testTableNameReturnsTableNamecovers and calls
Other tests reaching this symbol 23
MutationContractTest::testDeleteDecreasesRowCountcallsMutationContractTest::testDeleteOnEmptyTablecallsMutationContractTest::testMutationTableIsolationcallsRewriterContractTest::testDeleteReturnsWriteSimulatedWithMutationcallsFakeSqlRewriter::rewriteDeletecallsDataMutationTest::providerRowChangingMutationcallsMutationImpactTest::testImpactPreservesEveryChangedRowAndDuplicateMultiplicitycallsMutationImpactTest::testIsInsertLikeIsFalseForAStatementThatOnlyRemovesRowscallsMutationImpactTest::testReturningDeleteRowsComeFromMutationInputcallsShadowMutationTest::testDeleteDecreasesRowCountcoversShadowMutationTest::testDeleteOnEmptyTablecoversShadowMutationTest::testMutationTableIsolationcoversReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testEmptySelfReferentialCascadeTerminatesWithoutSyntheticEventscallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescallsShadowApplicationTest::testLastInsertIdOfIsNothingForAStatementThatInsertedNothingcallsTableTransitionsTest::testOfAnswersOneEntryPerTableSomethingHappenedTocallsTableTransitionsTest::testOfLeavesOutATableNothingHappenedTocalls
Relations§
Constant reads 1
- class-const packages/ztd-query-core/src/Compatibility/ClassAliases.php packages/ztd-query-core/src/Compatibility/ClassAliases.php:21