classTableDefinitionRegistry
final class TableDefinitionRegistry
Stores TableDefinition instances keyed by table name.
Methods§
public function register(string $tableName, TableDefinition $definition): voidRegister or replace a table definition.
Parameters
$tableName | string | |
$definition | TableDefinition |
Test cases 74
CascadingShop::registrycallsFakeSessionFactory::createcallsSchemaRegistryTest::testGetAllClearRegisterAndClearcallsSchemaRegistryTest::testRegisterGetUnregistercallsTableDefinitionRegistryTest::testClearGetAllClearRemovesActiveAndRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testGetAllAnswersEveryTableStillDescribedcovers and callsTableDefinitionRegistryTest::testGetAllRemovedAnswersTheTablesThatWereDroppedcovers and callsTableDefinitionRegistryTest::testHascovers and callsTableDefinitionRegistryTest::testHasAnyTablesIsFalseUntilOneIsRegisteredcovers and callsTableDefinitionRegistryTest::testIsRemovedTellsADroppedTableFromOneThatWasNeverTherecovers and callsTableDefinitionRegistryTest::testRegisterAndGetcovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testRestorePutsBackWhatWasDroppedAsWellAsWhatWasTherecovers and callsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testSnapshotRestoreReplacesRegistryStatecovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and callsSessionTest::testBeginTransactionRollBackTransactionBeginTransactionUsesProvidedTransactionManagerForSchemaRollbackcallsSessionTest::testForeignKeyFailureRestoresShadowStatecallsSessionTest::testParameterBindingCompilerResultColumnTypeResolverParameterBindingCompilerDelegatesCopyTargetsToTheConfiguredPlatformSupportcallsSessionTest::testTableDefinitionReturnsRegisteredSchemaOrNullcallsForeignKeyEndsTest::testReferencedColumnsFallsBackToTheParentsPrimaryKeycallsForeignKeyIntegrityTest::testAssertHoldsChecksNothingThroughAKeyWhoseEndsDisagreecallsForeignKeyIntegrityTest::testAssertHoldsLeavesAKeyWithANullInItAlonecallsForeignKeyIntegrityTest::testAssertHoldsLeavesARowThatDoesNotCarryTheKeyColumnsAlonecallsForeignKeyIntegrityTest::testAssertHoldsPassesAShadowInWhichEveryChildFindsItsParentcallsForeignKeyIntegrityTest::testAssertHoldsRefusesAShadowInWhichAChildReferencesNothingcallsCreateTableAsSelectMutationTest::testApplyThrowsExceptionWhenTableExistscallsCreateTableAsSelectMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableLikeMutationTest::testApplyCopiesSchemaFromSourceTablecallsCreateTableLikeMutationTest::testApplyEnsuresNewTableInShadowStorecallsCreateTableLikeMutationTest::testApplyThrowsExceptionWhenTargetTableExistscallsCreateTableLikeMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableMutationTest::testApplyThrowsExceptionWhenTableExistscallsCreateTableMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsDropTableMutationTest::testApplyClearsDataFromShadowStorecallsDropTableMutationTest::testApplyUnregistersTableFromSchemacallsDropTableMutationTest::testApplyWithIfExistsDropsExistingTablecallsReferentialIntegrityEnforcerTest::testAcceptsExplicitReferenceToNonPrimaryCandidateKeycallsReferentialIntegrityEnforcerTest::testCascadeNormalizesSparseChildRowIndexescallsReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testCompositePrimaryKeyUpdateCascadesOnlyMatchingChildrencallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testEmptySelfReferentialCascadeTerminatesWithoutSyntheticEventscallsReferentialIntegrityEnforcerTest::testExplicitReferencedColumnsAreNotReplacedByPrimaryKeycallsReferentialIntegrityEnforcerTest::testFallbackContinuesAfterIdentityMatchedRowcallsReferentialIntegrityEnforcerTest::testFallbackReferencedPrimaryKeyAppearsInUpdateViolationcallsReferentialIntegrityEnforcerTest::testFallbackTransitionPropagatesUpdateAndDeleteFromOneTablecallsReferentialIntegrityEnforcerTest::testIdentityTransitionSkipsIncompleteChangeAndProcessesFollowingChangecallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescallsReferentialIntegrityEnforcerTest::testMissingReferencedValuesDoNotStopLaterUpdateOrDeleteCascadescallsReferentialIntegrityEnforcerTest::testMultiTruncateCascadesFromEveryChangedParentTablecallsReferentialIntegrityEnforcerTest::testPrimaryKeyUpdateCascadesThroughOriginalRowIdentitycallsReferentialIntegrityEnforcerTest::testRejectsInsertWhoseParentDoesNotExistcallsReferentialIntegrityEnforcerTest::testRetainedOldKeyDoesNotStopFollowingUpdateCascadecallsReferentialIntegrityEnforcerTest::testRowsWithMissingPrimaryKeyCannotMatchRowsThatHaveTheKeycallsReferentialIntegrityEnforcerTest::testSchemaMutationDoesNotTriggerRowValidationcallsReferentialIntegrityEnforcerTest::testSchemaMutationSkipsRowIntegrityCheckscallsReferentialIntegrityEnforcerTest::testSynchronizeCascadesDeletedRowscallsReferentialIntegrityEnforcerTest::testUpdateCascadeCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testUpdateDoesNotCascadeWhileOldParentKeyStillExistscallsReferentialIntegrityEnforcerTest::testValidationContinuesPastMissingAndNullForeignKeyscallsShadowApplicationTest::testApplyLeavesTheShadowAsItWasWhenTheStatementIsRefusedcallsShadowApplicationTest::testLastInsertIdOfAnswersTheIdentityTheTableSaysIsNumberedcallsShadowApplicationTest::testLastInsertIdOfFallsBackToASingleColumnKeycallsShadowApplicationTest::testLastInsertIdOfIsNothingWhereNoColumnIsNumberedcallsShadowSavepointTest::testOfRemembersWhichTablesThereWerecallsShadowTransactionsTest::testRollBackPutsBackTheRowsTheTablesAndWhatDescribesThemcallsTableTransitionsTest::testOfAnswersOneEntryPerTableSomethingHappenedTocallsTableTransitionsTest::testOfLeavesOutATableNothingHappenedTocallsTableTransitionsTest::testOfReadsTheResultRowsOnlyForTheTableAnUpdateNamescalls
Called from 3
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation::applyResultSet() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:102
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:63
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:61
public function get(string $tableName): ?TableDefinitionReturn a table definition when present.
Parameters
$tableName | string |
Returns
Test cases 31
FakeSqlRewriter::buildShadowContextcallsFakeSqlRewriter::rewriteDeletecallsFakeSqlRewriter::rewriteInsertcallsFakeSqlRewriter::rewriteUpdatecallsSchemaRegistryTest::testGetAllClearRegisterAndClearcallsSchemaRegistryTest::testRegisterGetUnregistercallsTableDefinitionRegistryTest::testGetReturnsNullForUnknownTablecovers and callsTableDefinitionRegistryTest::testRegisterAndGetcovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testSnapshotRestoreReplacesRegistryStatecovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and callsSessionTest::testBeginTransactionRollBackTransactionBeginTransactionUsesProvidedTransactionManagerForSchemaRollbackcallsResultSetMutationTest::testApplyResultSetGivesTheNewTableTheColumnsTheResultDescribedcallsCreateTableAsSelectMutationTest::testApplyInfersColumnsFromResultRowsForSelectStarcallsCreateTableAsSelectMutationTest::testApplyKeepsParsedProjectionNamesWhenMetadataIsUnavailablecallsCreateTableAsSelectMutationTest::testApplyRegistersTableWithColumnsFromSelectcallsCreateTableAsSelectMutationTest::testApplyResultSetCreatesEmptyTableFromMetadatacallsCreateTableAsSelectMutationTest::testApplyResultSetKeepsExplicitColumnNamesWithMetadataTypescallsCreateTableAsSelectMutationTest::testApplyResultSetUsesMetadataTypesInsteadOfTextFallbackcallsCreateTableAsSelectMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableLikeMutationTest::testApplyCopiesSchemaFromSourceTablecallsCreateTableLikeMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableMutationTest::testApplyRegistersTableInSchemacallsCreateTableMutationTest::testApplyWithIfNotExistsCreatesWhenTableDoesNotExistcallsCreateTableMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsDropTableMutationTest::testApplyUnregistersTableFromSchemacallsDropTableMutationTest::testApplyWithIfExistsDropsExistingTablecallsDropTableMutationTest::testApplyWithIfExistsSkipsWhenTableDoesNotExistcallsShadowApplicationTest::testApplyLeavesTheShadowAsItWasWhenTheStatementIsRefusedcallsShadowSavepointTest::testOfRemembersWhichTablesThereWerecallsShadowTransactionsTest::testRollBackPutsBackTheRowsTheTablesAndWhatDescribesThemcalls
Called from 6
- method-call ZtdQuery\Session::tableDefinition() packages/ztd-query-core/src/Session.php:252
- method-call ZtdQuery\Session::copyTarget() packages/ztd-query-core/src/Session.php:278
- method-call ZtdQuery\Shadow\ForeignKeyEnds::referencedColumns() packages/ztd-query-core/src/Shadow/ForeignKeyEnds.php:39
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:58
- method-call ZtdQuery\Shadow\ShadowApplication::lastInsertIdOf() packages/ztd-query-core/src/Shadow/ShadowApplication.php:110
- method-call ZtdQuery\Shadow\TableTransitions::of() packages/ztd-query-core/src/Shadow/TableTransitions.php:61
public function has(string $tableName): boolCheck whether a table is registered.
Parameters
$tableName | string |
Returns
boolTest cases 3
Called from 4
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation::applyResultSet() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:65
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:51
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:53
- method-call ZtdQuery\Shadow\Mutation\Table\DropTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/DropTableMutation.php:50
public function getAll(): array<string, TableDefinition>Return all registered table definitions.
Returns
array<string, TableDefinition>Test cases 4
SchemaRegistryTest::testGetAllClearRegisterAndClearcallsTableDefinitionRegistryTest::testClearGetAllClearRemovesActiveAndRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testGetAllAnswersEveryTableStillDescribedcovers and callsTableDefinitionRegistryTest::testGetAllRemovedAnswersTheTablesThatWereDroppedcovers and calls
public function getAllRemoved(): array<string, TableDefinition>Returns
array<string, TableDefinition>Test cases 6
TableDefinitionRegistryTest::testClearGetAllClearRemovesActiveAndRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testGetAllRemovedAnswersTheTablesThatWereDroppedcovers and callsTableDefinitionRegistryTest::testMarkRemovedDoesNothingForATableNothingDescribedcovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsDropTableMutationTest::testApplyUnregistersTableFromSchemacalls
public function isRemoved(string $tableName): boolReports whether removed.
Parameters
$tableName | string |
Returns
boolTest cases 6
TableDefinitionRegistryTest::testIsRemovedTellsADroppedTableFromOneThatWasNeverTherecovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testRestorePutsBackWhatWasDroppedAsWellAsWhatWasTherecovers and callsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and callsDropTableMutationTest::testApplyUnregistersTableFromSchemacalls
public function hasAnyTables(): boolCheck whether at least one table is registered.
Returns
boolTest cases 2
public function clear(): voidRemove all registered tables.
public function snapshot(): selfSnapshot.
Returns
selfTest cases 3
public function restore(self $snapshot): voidRestore.
Parameters
$snapshot | self |
Test cases 3
public function unregister(string $tableName): voidRemove a registered table.
Parameters
$tableName | string |
Test cases 6
SchemaRegistryTest::testRegisterGetUnregistercallsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testSnapshotRestoreReplacesRegistryStatecovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and callsSessionTest::testBeginTransactionRollBackTransactionBeginTransactionUsesProvidedTransactionManagerForSchemaRollbackcallsShadowTransactionsTest::testRollBackPutsBackTheRowsTheTablesAndWhatDescribesThemcalls
public function markRemoved(string $tableName): voidMark removed.
Parameters
$tableName | string |
Test cases 8
TableDefinitionRegistryTest::testClearGetAllClearRemovesActiveAndRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testGetAllRemovedAnswersTheTablesThatWereDroppedcovers and callsTableDefinitionRegistryTest::testIsRemovedTellsADroppedTableFromOneThatWasNeverTherecovers and callsTableDefinitionRegistryTest::testMarkRemovedDoesNothingForATableNothingDescribedcovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testRestorePutsBackWhatWasDroppedAsWellAsWhatWasTherecovers and callsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and calls
Private surface 2§
Implementation details, listed for orientation only.
private array<string, TableDefinition> $definitions = []private array<string, TableDefinition> $removedDefinitions = []Test cases 146§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 14
TableDefinitionRegistryTest::testClearGetAllClearRemovesActiveAndRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testGetAllAnswersEveryTableStillDescribedcovers and callsTableDefinitionRegistryTest::testGetAllRemovedAnswersTheTablesThatWereDroppedcovers and callsTableDefinitionRegistryTest::testGetReturnsNullForUnknownTablecovers and callsTableDefinitionRegistryTest::testHascovers and callsTableDefinitionRegistryTest::testHasAnyTablesIsFalseUntilOneIsRegisteredcovers and callsTableDefinitionRegistryTest::testIsRemovedTellsADroppedTableFromOneThatWasNeverTherecovers and callsTableDefinitionRegistryTest::testMarkRemovedDoesNothingForATableNothingDescribedcovers and callsTableDefinitionRegistryTest::testRegisterAndGetcovers and callsTableDefinitionRegistryTest::testRemovedDefinitionIsInactiveUntilRegisteredAgaincovers and callsTableDefinitionRegistryTest::testRestorePutsBackWhatWasDroppedAsWellAsWhatWasTherecovers and callsTableDefinitionRegistryTest::testSnapshotRestoreIncludesRemovedDefinitionscovers and callsTableDefinitionRegistryTest::testSnapshotRestoreReplacesRegistryStatecovers and callsTableDefinitionRegistryTest::testUnregisterLeavesNoTraceOfTheTableAtAllcovers and calls
Other tests reaching this symbol 132
RewriterContractTest::buildRewritercallsCascadingShop::registrycallsFakeSessionFactory::createcallsFakeSqlRewriter::buildShadowContextcallsFakeSqlRewriter::rewriteDeletecallsFakeSqlRewriter::rewriteInsertcallsFakeSqlRewriter::rewriteUpdatecallsSessionUnderTest::overcallsClassAliasesTest::testFormerNameTypeAcceptsTheRelocatedClassBeforeTheFormerNameIsUsedcallsSqlRewriterTest::testEmptyResultSelectAnswersAStatementThatYieldsNoRowscallsSqlRewriterTest::testRewriteAnswersAPlanForTheStatementItWasGivencallsSqlRewriterTest::testRewriteAnswersASimulatedWriteForAStatementThatWouldChangeSomethingcallsSqlRewriterTest::testRewriteMultipleAnswersOnePlanPerStatementOfABatchcallsSqlRewriterTest::testSplitStatementsAnswersTheStatementsABatchIsWrittenAscallsSqlRewriterTest::testTransactionStatementIsNothingForAStatementThatIsNotOnecallsSchemaRegistryTest::testGetAllClearRegisterAndClearcallsSchemaRegistryTest::testRegisterGetUnregistercallsSessionTest::testBeginTransactionRollBackTransactionBeginTransactionUsesProvidedTransactionManagerForSchemaRollbackcallsSessionTest::testDisableEnableDisableEnableAndDisablecallsSessionTest::testForeignKeyFailureRestoresShadowStatecallsSessionTest::testMutationFailureIsConvertedToDatabaseExceptioncallsSessionTest::testParameterBindingCompilerResultColumnTypeResolverParameterBindingCompilerDelegatesCopyTargetsToTheConfiguredPlatformSupportcallsSessionTest::testSplitStatementsUsesPlatformRewritercallsSessionTest::testTableDefinitionReturnsRegisteredSchemaOrNullcallsForeignKeyCascadeTest::testApplyActionCarriesTheNewValueWhereTheActionSaysToCascadecallsForeignKeyCascadeTest::testApplyActionRefusesTheStatementWhereTheActionForbidsItcallsForeignKeyCascadeTest::testApplyActionSetsTheKeyToNullWhereTheActionSaysTocallsForeignKeyCascadeTest::testCarryDeleteDropsEveryChildThatWasHoldingTheKeyWhereTheActionCascadescallsForeignKeyCascadeTest::testCarryDeleteReachesNothingWhereTheParentTableStillHoldsTheKeycallsForeignKeyCascadeTest::testCarryDeleteSetsTheKeyToNullWhereTheActionSaysToRatherThanDroppingTheRowcallsForeignKeyCascadeTest::testCarryUpdateReachesNothingWhereTheParentTableStillHoldsTheOldKeycallsForeignKeyCascadeTest::testCarryUpdateWritesTheNewKeyIntoEveryChildThatWasHoldingTheOldOnecallsForeignKeyCascadeTest::testOfCarriesTheNewKeyToTheChildrenOfAnUpdatedParentcallsForeignKeyCascadeTest::testOfDeletesTheChildrenOfADeletedParentWhereTheActionSaysToCascadecallsForeignKeyCascadeTest::testOfFollowsNothingThroughAKeyWhoseEndsDisagreecallsForeignKeyCascadeTest::testOfLeavesTheChildrenAloneWhileAnotherParentRowHoldsTheKeyUpcallsForeignKeyEndsTest::testAreBalancedIsFalseWhereTheEndsDisagreecallsForeignKeyEndsTest::testAreBalancedWhenBothEndsNameTheSameNumberOfColumnscallsForeignKeyEndsTest::testReferencedColumnsAnswersTheColumnsTheKeyNamescallsForeignKeyEndsTest::testReferencedColumnsFallsBackToTheParentsPrimaryKeycallsForeignKeyEndsTest::testReferencedColumnsIsEmptyWhereTheParentIsUnknowncallsForeignKeyIntegrityTest::testAssertHoldsChecksNothingThroughAKeyWhoseEndsDisagreecallsForeignKeyIntegrityTest::testAssertHoldsLeavesAKeyWithANullInItAlonecallsForeignKeyIntegrityTest::testAssertHoldsLeavesARowThatDoesNotCarryTheKeyColumnsAlonecallsForeignKeyIntegrityTest::testAssertHoldsPassesAShadowInWhichEveryChildFindsItsParentcallsForeignKeyIntegrityTest::testAssertHoldsRefusesAShadowInWhichAChildReferencesNothingcallsResultSetMutationTest::testApplyResultSetGivesTheNewTableTheColumnsTheResultDescribedcallsResultSetMutationTest::testApplyResultSetGivesTheNewTableTheRowsTheResultCarriedcallsCreateTableAsSelectMutationTest::testApplyInfersColumnsFromResultRowsForSelectStarcallsCreateTableAsSelectMutationTest::testApplyKeepsParsedProjectionNamesWhenMetadataIsUnavailablecallsCreateTableAsSelectMutationTest::testApplyRegistersTableWithColumnsFromSelectcallsCreateTableAsSelectMutationTest::testApplyResultSetCreatesEmptyTableFromMetadatacallsCreateTableAsSelectMutationTest::testApplyResultSetKeepsExplicitColumnNamesWithMetadataTypescallsCreateTableAsSelectMutationTest::testApplyResultSetUsesMetadataTypesInsteadOfTextFallbackcallsCreateTableAsSelectMutationTest::testApplyStoresRowsFromSelectResultcallsCreateTableAsSelectMutationTest::testApplyThrowsExceptionWhenTableExistscallsCreateTableAsSelectMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableAsSelectMutationTest::testTableNameReturnsNewTableNamecallsCreateTableLikeMutationTest::testApplyCopiesSchemaFromSourceTablecallsCreateTableLikeMutationTest::testApplyEnsuresNewTableInShadowStorecallsCreateTableLikeMutationTest::testApplyThrowsExceptionWhenSourceTableDoesNotExistcallsCreateTableLikeMutationTest::testApplyThrowsExceptionWhenTargetTableExistscallsCreateTableLikeMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableLikeMutationTest::testTableNameReturnsNewTableNamecallsCreateTableMutationTest::testApplyEnsuresTableInShadowStorecallsCreateTableMutationTest::testApplyRegistersTableInSchemacallsCreateTableMutationTest::testApplyThrowsExceptionWhenTableExistscallsCreateTableMutationTest::testApplyWithIfNotExistsCreatesWhenTableDoesNotExistcallsCreateTableMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableMutationTest::testTableNameReturnsTableNamecallsDropTableMutationTest::testApplyClearsDataFromShadowStorecallsDropTableMutationTest::testApplyThrowsExceptionWhenTableDoesNotExistcallsDropTableMutationTest::testApplyUnregistersTableFromSchemacallsDropTableMutationTest::testApplyWithIfExistsDropsExistingTablecallsDropTableMutationTest::testApplyWithIfExistsSkipsWhenTableDoesNotExistcallsDropTableMutationTest::testTableNameReturnsTableNamecallsReferentialIntegrityEnforcerTest::testAcceptsExplicitReferenceToNonPrimaryCandidateKeycallsReferentialIntegrityEnforcerTest::testCascadeNormalizesSparseChildRowIndexescallsReferentialIntegrityEnforcerTest::testCompositeDeleteSetNullNormalizesEveryForeignKeyColumncallsReferentialIntegrityEnforcerTest::testCompositePrimaryKeyUpdateCascadesOnlyMatchingChildrencallsReferentialIntegrityEnforcerTest::testDeleteCascadePropagatesAcrossMultipleLevelscallsReferentialIntegrityEnforcerTest::testDeleteCascadeRemovesAllMatchingChildrenAndKeepsOtherscallsReferentialIntegrityEnforcerTest::testDeleteRestrictRejectsParentRemovalcallsReferentialIntegrityEnforcerTest::testDeleteSetNullCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testDeleteSetNullUpdatesChildcallsReferentialIntegrityEnforcerTest::testEmptySelfReferentialCascadeTerminatesWithoutSyntheticEventscallsReferentialIntegrityEnforcerTest::testExplicitReferencedColumnsAreNotReplacedByPrimaryKeycallsReferentialIntegrityEnforcerTest::testFallbackContinuesAfterIdentityMatchedRowcallsReferentialIntegrityEnforcerTest::testFallbackReferencedPrimaryKeyAppearsInUpdateViolationcallsReferentialIntegrityEnforcerTest::testFallbackTransitionPropagatesUpdateAndDeleteFromOneTablecallsReferentialIntegrityEnforcerTest::testIdentityTransitionSkipsIncompleteChangeAndProcessesFollowingChangecallsReferentialIntegrityEnforcerTest::testMatchingConstraintAfterUnrelatedConstraintStillCascadescallsReferentialIntegrityEnforcerTest::testMissingReferencedValuesDoNotStopLaterUpdateOrDeleteCascadescallsReferentialIntegrityEnforcerTest::testMultiTruncateCascadesFromEveryChangedParentTablecallsReferentialIntegrityEnforcerTest::testPrimaryKeyUpdateCascadesThroughOriginalRowIdentitycallsReferentialIntegrityEnforcerTest::testRejectsInsertWhoseParentDoesNotExistcallsReferentialIntegrityEnforcerTest::testRetainedOldKeyDoesNotStopFollowingUpdateCascadecallsReferentialIntegrityEnforcerTest::testRowsWithMissingPrimaryKeyCannotMatchRowsThatHaveTheKeycallsReferentialIntegrityEnforcerTest::testSchemaMutationDoesNotTriggerRowValidationcallsReferentialIntegrityEnforcerTest::testSchemaMutationSkipsRowIntegrityCheckscallsReferentialIntegrityEnforcerTest::testSynchronizeCascadesDeletedRowscallsReferentialIntegrityEnforcerTest::testUpdateCascadeCarriesOriginalRowIntoNextLevelcallsReferentialIntegrityEnforcerTest::testUpdateDoesNotCascadeWhileOldParentKeyStillExistscallsReferentialIntegrityEnforcerTest::testValidationContinuesPastMissingAndNullForeignKeyscallsShadowApplicationTest::testApplyAnswersWhatTheStatementCameTocallsShadowApplicationTest::testApplyLeavesTheShadowAsItWasWhenTheStatementIsRefusedcallsShadowApplicationTest::testApplyWritesTheRowsAMutationDescribesIntoTheShadowcallsShadowApplicationTest::testLastInsertIdOfAnswersTheIdentityTheTableSaysIsNumberedcallsShadowApplicationTest::testLastInsertIdOfFallsBackToASingleColumnKeycallsShadowApplicationTest::testLastInsertIdOfIsNothingForAStatementThatInsertedNothingcallsShadowApplicationTest::testLastInsertIdOfIsNothingWhereNoColumnIsNumberedcallsShadowSavepointTest::testOfRemembersWhichTablesThereWerecallsShadowTransactionsTest::testRollBackPutsBackTheRowsTheTablesAndWhatDescribesThemcallsTableTransitionsTest::testBetweenPairsARowByTheOldKeyTheResultCarriescallsTableTransitionsTest::testBetweenPairsOnlyIdenticalRowsWhereTheTableDeclaresNoKeycallsTableTransitionsTest::testBetweenPairsTwoRowsSharingAKeyOneToOnecallsTableTransitionsTest::testBetweenReadsARowThatChangedAsUpdatedcallsTableTransitionsTest::testBetweenReadsARowThatIsNoLongerThereAsDeletedcallsTableTransitionsTest::testOfAnswersOneEntryPerTableSomethingHappenedTocallsTableTransitionsTest::testOfLeavesOutATableNothingHappenedTocallsTableTransitionsTest::testOfReadsTheResultRowsOnlyForTheTableAnUpdateNamescallsTableTransitionsTest::testPairByIdentityLeavesARowNoResultRowSpeaksForcallsTableTransitionsTest::testPairByIdentityTakesThePairsAnUpdateToldUsAboutcallsTableTransitionsTest::testPairByKeyLeavesARowAlreadyPairedOffcallsTableTransitionsTest::testPairByKeyLeavesARowTheKeyNoLongerMatchescallsTableTransitionsTest::testPairByKeyPairsOffWhateverTheKeyStillMatchescallsTableTransitionsTest::testPairIdenticalPairsOffOnlyRowsThatAreWhatTheyWerecallsTableTransitionsTest::testUnmatchedAnswersTheRowsNothingWasPairedWithcallsStatementSimulatorTestcallsTransactionStatementParserTest::testParseReadsAStatementThatDeclaresASavepointcallsTransactionStatementParserTest::testParseReadsAStatementThatGivesUpASavepointcallsTransactionStatementParserTest::testParseReadsAStatementThatOpensATransactioncalls
Relations§
Instantiated in 2
Method calls 16
- method-call ZtdQuery\Session::tableDefinition() packages/ztd-query-core/src/Session.php:252
- method-call ZtdQuery\Session::copyTarget() packages/ztd-query-core/src/Session.php:278
- method-call ZtdQuery\Shadow\ForeignKeyEnds::referencedColumns() packages/ztd-query-core/src/Shadow/ForeignKeyEnds.php:39
- method-call ZtdQuery\Shadow\ForeignKeyIntegrity::assertHolds() packages/ztd-query-core/src/Shadow/ForeignKeyIntegrity.php:45
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation::applyResultSet() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:65
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation::applyResultSet() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:102
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:51
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:58
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:63
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:53
- method-call ZtdQuery\Shadow\Mutation\Table\CreateTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:61
- method-call ZtdQuery\Shadow\Mutation\Table\DropTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/DropTableMutation.php:50
- method-call ZtdQuery\Shadow\Mutation\Table\DropTableMutation::apply() packages/ztd-query-core/src/Shadow/Mutation/Table/DropTableMutation.php:57
- method-call ZtdQuery\Shadow\ReferentialIntegrityEnforcer::synchronize() packages/ztd-query-core/src/Shadow/ReferentialIntegrityEnforcer.php:61
- method-call ZtdQuery\Shadow\ShadowApplication::lastInsertIdOf() packages/ztd-query-core/src/Shadow/ShadowApplication.php:110
- method-call ZtdQuery\Shadow\TableTransitions::of() packages/ztd-query-core/src/Shadow/TableTransitions.php:61
Type declarations 19
- type ZtdQuery\Session packages/ztd-query-core/src/Session.php:62
- type ZtdQuery\Session packages/ztd-query-core/src/Session.php:90
- type ZtdQuery\Shadow\ForeignKeyEnds packages/ztd-query-core/src/Shadow/ForeignKeyEnds.php:22
- type ZtdQuery\Shadow\ForeignKeyIntegrity packages/ztd-query-core/src/Shadow/ForeignKeyIntegrity.php:28
- type ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:27
- type ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:41
- type ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:21
- type ZtdQuery\Shadow\Mutation\Table\CreateTableLikeMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableLikeMutation.php:35
- type ZtdQuery\Shadow\Mutation\Table\CreateTableMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:21
- type ZtdQuery\Shadow\Mutation\Table\CreateTableMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableMutation.php:35
- type ZtdQuery\Shadow\Mutation\Table\DropTableMutation packages/ztd-query-core/src/Shadow/Mutation/Table/DropTableMutation.php:19
- type ZtdQuery\Shadow\Mutation\Table\DropTableMutation packages/ztd-query-core/src/Shadow/Mutation/Table/DropTableMutation.php:33
- type ZtdQuery\Shadow\ReferentialIntegrityEnforcer packages/ztd-query-core/src/Shadow/ReferentialIntegrityEnforcer.php:29
- type ZtdQuery\Shadow\ShadowApplication packages/ztd-query-core/src/Shadow/ShadowApplication.php:40
- type ZtdQuery\Shadow\ShadowSavepoint packages/ztd-query-core/src/Shadow/ShadowSavepoint.php:32
- type ZtdQuery\Shadow\ShadowSavepoint packages/ztd-query-core/src/Shadow/ShadowSavepoint.php:45
- type ZtdQuery\Shadow\ShadowSavepoint packages/ztd-query-core/src/Shadow/ShadowSavepoint.php:60
- type ZtdQuery\Shadow\ShadowTransactions packages/ztd-query-core/src/Shadow/ShadowTransactions.php:44
- type ZtdQuery\Shadow\TableTransitions packages/ztd-query-core/src/Shadow/TableTransitions.php:39