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> |
public function apply(ShadowStore $store, array $rows): void{@inheritDoc}
Parameters
$store | ShadowStore | |
$rows | array |
Test cases 14
MutationContractTest::testDeleteDecreasesRowCountcallsMutationContractTest::testDeleteOnEmptyTablecallsMutationContractTest::testMutationTableIsolationcallsDeleteMutationTest::testApplyRemovesMultipleRowscallsDeleteMutationTest::testApplyRemovesRowsByPrimaryKeycallsDeleteMutationTest::testApplyWithCompositePrimaryKeycallsDeleteMutationTest::testApplyWithEmptyRowsDoesNothingcallsDeleteMutationTest::testApplyWithNonExistentRowDoesNothingcallsReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescalls
Calls 1
- method-call ShadowStore::delete() line 45
public function tableName(): stringPrivate surface 2§
Implementation details, listed for orientation only.
private string $tableNameprivate array<int, string> $primaryKeysTest cases 81§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
DeleteMutationTest::testApplyRemovesMultipleRowscallsDeleteMutationTest::testApplyRemovesRowsByPrimaryKeycallsDeleteMutationTest::testApplyWithCompositePrimaryKeycallsDeleteMutationTest::testApplyWithEmptyRowsDoesNothingcallsDeleteMutationTest::testApplyWithNonExistentRowDoesNothingcallsDeleteMutationTest::testTableNameReturnsTableNamecalls
Other tests reaching this symbol 75
MutationContractTest::testDeleteDecreasesRowCountcallsMutationContractTest::testDeleteOnEmptyTablecallsMutationContractTest::testMutationTableIsolationcallsRewriterContractTest::testDeleteReturnsWriteSimulatedWithMutationcallsFakeSqlRewriter::rewriteDeletecallsMySqlRewriterTest::testDeleteReturnsWriteSimulatedWithMutationcallsMySqlRewriterTest::testRewriteDeleteCreatesMutationcallsMySqlRewriterTest::testRewriteWithStatementDeleteIgnoresHashCommentsAroundItsCteHeadercallsPgSqlRewriterTest::testDeleteMutationTableNamecallsPgSqlRewriterTest::testDeleteResolvesTargetAfterBlockCommentcallsPgSqlRewriterTest::testDeleteReturnsWriteSimulatedWithMutationcallsPgSqlRewriterTest::testRewriteDeleteReturnsWriteSimulatedcallsSqliteRewriterTest::testDeleteEnsuresShadowStorecallsSqliteRewriterTest::testDeleteFromWithoutWhereReturnsWriteSimulatedcallsSqliteRewriterTest::testDeleteResolvesTargetAfterBlockCommentcallsSqliteRewriterTest::testDeleteReturnsWriteSimulatedWithMutationcallsDataMutationTest::providerRowChangingMutationcallsMutationImpactTest::testImpactPreservesEveryChangedRowAndDuplicateMultiplicitycallsMutationImpactTest::testIsInsertLikeIsFalseForAStatementThatOnlyRemovesRowscallsMutationImpactTest::testReturningDeleteRowsComeFromMutationInputcallsRowMutationResolverTest::testResolveDeletecallsShadowMutationTestcallsMySqlMutationResolverTest::testDeleteUsesColumnsFromShadowStorecallsMySqlMutationResolverTest::testResolveDeleteEnsuresTargetTableInStorecallsMySqlMutationResolverTest::testResolveDeleteReturnsDeleteMutationcallsMySqlMutationResolverTest::testResolveDeleteUsesColumnsFromRegistryWhenStoreEmptycallsMySqlMutationResolverTest::testResolveDeleteUsesColumnsFromShadowStoreFirstcallsMySqlMutationResolverTest::testResolveDeleteWithShadowDataButNoDefinitioncallsMySqlMutationResolverTest::testResolveDeleteWithSingleTargetReturnsPrimaryKeyscallsPgSqlMutationResolverTest::testResolveDeleteLowercaseExtractsTablecallsPgSqlMutationResolverTest::testResolveDeleteReturnsDeleteMutationcallsPgSqlMutationResolverTest::testResolveDeleteReturnsPrimaryKeysFromRegistrycallsPgSqlMutationResolverTest::testResolveDeleteWithoutRegistryReturnsEmptyPrimaryKeyscallsPgSqlMutationResolverTest::testResolveDeleteWithShadowRowsDoesNotThrowcallsPgSqlMutationResolverTest::testResolveDeleteWithShadowStoreDatacallsPgSqlMutationResolverTest::testResolveDeleteWithShadowStoreOnlyNoRegistrycallsReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testEmptySelfReferentialCascadeTerminatesWithoutSyntheticEventscallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescallsRowMutationResolverTest::testResolveDeletecallsRowMutationResolverTest::testResolveDeleteCaseInsensitiveRegexcallsRowMutationResolverTest::testResolveDeleteEnsuresShadowStorecallsRowMutationResolverTest::testResolveDeleteFullTableLowercaseMatchesRegexcallsRowMutationResolverTest::testResolveDeleteFullTableWithoutWherecallsRowMutationResolverTest::testResolveDeleteLowercaseSqlcallsRowMutationResolverTest::testResolveDeleteTableNamecallsRowMutationResolverTest::testResolveDeleteWithCommentsMatchesRegexcallsRowMutationResolverTest::testResolveDeleteWithDefinitionReturnsPrimaryKeyscallsRowMutationResolverTest::testResolveDeleteWithExistingRowscallsRowMutationResolverTest::testResolveDeleteWithLeadingWhitespaceLowercasecallsRowMutationResolverTest::testResolveDeleteWithOnlyTableNameNoWhereNoTrailingcallsRowMutationResolverTest::testResolveDeleteWithoutDefinitionButWithShadowRowscallsRowMutationResolverTest::testResolveDeleteWithStrippedCommentsMatchesRegexcallsShadowApplicationTest::testLastInsertIdOfIsNothingForAStatementThatInsertedNothingcallsSqliteMutationResolverTest::testResolveDeletecallsSqliteMutationResolverTest::testResolveDeleteCaseInsensitiveRegexcallsSqliteMutationResolverTest::testResolveDeleteEnsuresShadowStorecallsSqliteMutationResolverTest::testResolveDeleteFullTableLowercaseMatchesRegexcallsSqliteMutationResolverTest::testResolveDeleteFullTableWithoutWherecallsSqliteMutationResolverTest::testResolveDeleteLowercaseSqlcallsSqliteMutationResolverTest::testResolveDeleteTableNamecallsSqliteMutationResolverTest::testResolveDeleteWithCommentsMatchesRegexcallsSqliteMutationResolverTest::testResolveDeleteWithDefinitionReturnsPrimaryKeyscallsSqliteMutationResolverTest::testResolveDeleteWithExistingRowscallsSqliteMutationResolverTest::testResolveDeleteWithLeadingWhitespaceLowercasecallsSqliteMutationResolverTest::testResolveDeleteWithOnlyTableNameNoWhereNoTrailingcallsSqliteMutationResolverTest::testResolveDeleteWithoutDefinitionButWithShadowRowscallsSqliteMutationResolverTest::testResolveDeleteWithStrippedCommentsMatchesRegexcallsTableTransitionsTest::testOfAnswersOneEntryPerTableSomethingHappenedTocallsTableTransitionsTest::testOfLeavesOutATableNothingHappenedTocalls
Relations§
Instantiated in 3
- new ZtdQuery\Platform\MySql\Shadow\Mutation\Row\RowMutationResolver::resolveDelete() packages/ztd-query-mysql/src/Shadow/Mutation/Row/RowMutationResolver.php:128
- new ZtdQuery\Platform\Postgres\Shadow\Mutation\Row\RowMutationResolver::resolveDelete() packages/ztd-query-postgres/src/Shadow/Mutation/Row/RowMutationResolver.php:145
- new ZtdQuery\Platform\Sqlite\Shadow\Resolution\RowMutationResolver::resolveDelete() packages/ztd-query-sqlite/src/Shadow/Resolution/RowMutationResolver.php:79