classRowMutationResolver
final class RowMutationResolver
Restricted visibility: declared "@visibility ZtdQuery\Platform\Sqlite". Code outside that scope must not name this declaration.
Resolves row updates and deletions against the current shadow schema.
Methods§
public function __construct(
private SqliteParser $parser,
private TableDefinitionRegistry $registry,
private ShadowStore $shadowStore,
)Binds the collaborators used by this operation.
Parameters
$parser | SqliteParser | |
$registry | TableDefinitionRegistry | |
$shadowStore | ShadowStore |
public function resolveUpdate(string $sql): ShadowMutationResolves row updates and deletions against the current shadow schema.
Parameters
$sql | string |
Returns
Test cases 10
RowMutationResolverTest::testResolveUpdatecallsRowMutationResolverTest::testResolveUpdateEnsuresShadowStoreWithDefinitioncallsRowMutationResolverTest::testResolveUpdatePrimaryKeysFromDefinitioncallsRowMutationResolverTest::testResolveUpdateWithDefinitionReturnsPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutContextThrowsUnknownSchemacallsRowMutationResolverTest::testResolveUpdateWithoutDefinitionHasEmptyPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutDefinitionReturnsEmptyPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutTargetContextThrowsUnknownSchemacallsRowMutationResolverTest::testResolveUpdateWithoutTargetThrowscallsRowMutationResolverTest::testResolveUpdateWithPrimaryKeyscalls
Called from 1
Calls 10
- method-call SqliteParser::extractTargetTable() line 41
- new UnsupportedSqlException line 43
- method-call MutationTableLookup::assertTableWasNotRemoved() line 45
- new MutationTableLookup line 45
- method-call TableDefinitionRegistry::get() line 47
- method-call ShadowStore::state() line 48
- class-const ShadowTableState::Initialized() line 48
- new UnknownSchemaException line 49
- method-call ShadowStore::ensure() line 52
- new UpdateMutation line 55
public function resolveDelete(string $sql): ShadowMutationResolves row updates and deletions against the current shadow schema.
Parameters
$sql | string |
Returns
Test cases 18
RowMutationResolverTest::testResolveDeletecallsRowMutationResolverTest::testResolveDeleteCaseInsensitiveRegexcallsRowMutationResolverTest::testResolveDeleteEnsuresShadowStorecallsRowMutationResolverTest::testResolveDeleteEnsuresShadowStoreEntryCreatedcallsRowMutationResolverTest::testResolveDeleteFullTableLowercaseMatchesRegexcallsRowMutationResolverTest::testResolveDeleteFullTableWithoutWherecallsRowMutationResolverTest::testResolveDeleteLowercaseSqlcallsRowMutationResolverTest::testResolveDeleteTableNamecallsRowMutationResolverTest::testResolveDeleteUnknownTableThrowscallsRowMutationResolverTest::testResolveDeleteWithCommentsMatchesRegexcallsRowMutationResolverTest::testResolveDeleteWithDefinitionReturnsPrimaryKeyscallsRowMutationResolverTest::testResolveDeleteWithExistingRowscallsRowMutationResolverTest::testResolveDeleteWithLeadingWhitespaceLowercasecallsRowMutationResolverTest::testResolveDeleteWithOnlyTableNameNoWhereNoTrailingcallsRowMutationResolverTest::testResolveDeleteWithoutDefinitionAndNoRowsThrowscallsRowMutationResolverTest::testResolveDeleteWithoutDefinitionButWithShadowRowscallsRowMutationResolverTest::testResolveDeleteWithoutTargetThrowscallsRowMutationResolverTest::testResolveDeleteWithStrippedCommentsMatchesRegexcalls
Called from 1
Calls 10
- method-call SqliteParser::extractTargetTable() line 65
- new UnsupportedSqlException line 67
- method-call MutationTableLookup::assertTableWasNotRemoved() line 69
- new MutationTableLookup line 69
- method-call TableDefinitionRegistry::get() line 71
- method-call ShadowStore::state() line 72
- class-const ShadowTableState::Initialized() line 72
- new UnknownSchemaException line 73
- method-call ShadowStore::ensure() line 76
- new DeleteMutation line 79
Private surface 3§
Implementation details, listed for orientation only.
private SqliteParser $parserprivate TableDefinitionRegistry $registryprivate ShadowStore $shadowStoreTest cases 32§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 28
RowMutationResolverTest::testResolveDeletecallsRowMutationResolverTest::testResolveDeleteCaseInsensitiveRegexcallsRowMutationResolverTest::testResolveDeleteEnsuresShadowStorecallsRowMutationResolverTest::testResolveDeleteEnsuresShadowStoreEntryCreatedcallsRowMutationResolverTest::testResolveDeleteFullTableLowercaseMatchesRegexcallsRowMutationResolverTest::testResolveDeleteFullTableWithoutWherecallsRowMutationResolverTest::testResolveDeleteLowercaseSqlcallsRowMutationResolverTest::testResolveDeleteTableNamecallsRowMutationResolverTest::testResolveDeleteUnknownTableThrowscallsRowMutationResolverTest::testResolveDeleteWithCommentsMatchesRegexcallsRowMutationResolverTest::testResolveDeleteWithDefinitionReturnsPrimaryKeyscallsRowMutationResolverTest::testResolveDeleteWithExistingRowscallsRowMutationResolverTest::testResolveDeleteWithLeadingWhitespaceLowercasecallsRowMutationResolverTest::testResolveDeleteWithOnlyTableNameNoWhereNoTrailingcallsRowMutationResolverTest::testResolveDeleteWithoutDefinitionAndNoRowsThrowscallsRowMutationResolverTest::testResolveDeleteWithoutDefinitionButWithShadowRowscallsRowMutationResolverTest::testResolveDeleteWithoutTargetThrowscallsRowMutationResolverTest::testResolveDeleteWithStrippedCommentsMatchesRegexcallsRowMutationResolverTest::testResolveUpdatecallsRowMutationResolverTest::testResolveUpdateEnsuresShadowStoreWithDefinitioncallsRowMutationResolverTest::testResolveUpdatePrimaryKeysFromDefinitioncallsRowMutationResolverTest::testResolveUpdateWithDefinitionReturnsPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutContextThrowsUnknownSchemacallsRowMutationResolverTest::testResolveUpdateWithoutDefinitionHasEmptyPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutDefinitionReturnsEmptyPrimaryKeyscallsRowMutationResolverTest::testResolveUpdateWithoutTargetContextThrowsUnknownSchemacallsRowMutationResolverTest::testResolveUpdateWithoutTargetThrowscallsRowMutationResolverTest::testResolveUpdateWithPrimaryKeyscalls
Other tests reaching this symbol 4
SqliteRewriterTestcallsStatementRewriterTestcallsSqliteMutationResolverTestcallsSqliteSessionFactoryTestcalls