classOperationApplier
final class OperationApplier
Restricted visibility: declared "@visibility ZtdQuery\Platform\MySql". Code outside that scope must not name this declaration.
Operation Applier.
Methods§
public function __construct(
private AlterStatement $alterStatement,
private TableDefinitionRegistry $registry,
private string $tableName,
)Configure the dependencies used by this operation.
Parameters
$alterStatement | AlterStatement | |
$registry | TableDefinitionRegistry | |
$tableName | string |
public function applyOperation(
CreateStatement $createStmt,
AlterOperation $op,
ShadowStore $store,
TableDefinition $definition,
): stringApply a single ALTER operation to the CREATE statement.
Parameters
$createStmt | CreateStatement | |
$op | AlterOperation | |
$store | ShadowStore | |
$definition | TableDefinition |
Returns
stringThrows
Test cases 2
Called from 1
Calls 15
- method-call ColumnAction::detect() line 39
- new ColumnAction line 39
- new ColumnAlteration line 41
- method-call ColumnAlteration::applyAddColumn() line 43
- method-call ColumnAlteration::applyDropColumn() line 44
- method-call ColumnAlteration::applyModifyColumn() line 45
- method-call ColumnAlteration::applyChangeColumn() line 46
- static-call OptionList::hasAny() line 50
- method-call OperationApplier::applyRenameTable() line 51
- method-call PrimaryKeyAlteration::applyAddPrimaryKey() line 53
- new PrimaryKeyAlteration line 53
- method-call PrimaryKeyAlteration::applyDropPrimaryKey() line 55
- method-call ColumnAlteration::applyRenameColumn() line 59
- new UnsupportedSqlException line 63
- static-call
AlterOperation::build()line 63
public function applyRenameTable(AlterOperation $op, ShadowStore $store): voidApply Rename Table for the supplied MySQL input.
Parameters
$op | AlterOperation | |
$store | ShadowStore |
Test cases 1
Called from 1
Calls 7
- function-call
is_stringline 74 - function-call
str_replaceline 78 - method-call ShadowStore::get() line 80
- method-call ShadowStore::set() line 81
- method-call TableDefinitionRegistry::get() line 84
- method-call TableDefinitionRegistry::unregister() line 86
- method-call TableDefinitionRegistry::register() line 87
Private surface 3§
Implementation details, listed for orientation only.
private AlterStatement $alterStatementprivate TableDefinitionRegistry $registryprivate string $tableNameTest cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 6
MySqlSessionFactoryTestcallsMySqlRewriterTestcallsStatementRewriterTestcallsAlterTableMutationTestcallsTableMutationResolverTestcallsMySqlMutationResolverTestcalls