classColumnAlreadyExistsException
final class ColumnAlreadyExistsException
extends SimulationException
Exception thrown when attempting to add a column that already exists.
Methods§
public function __construct(string $sql, string $tableName, string $columnName)Parameters
$sql | string | The SQL statement. |
$tableName | string | The name of the table. |
$columnName | string | The name of the column that already exists. |
Calls 2
- static-call SimulationException::__construct() line 34
- function-call
sprintfline 34
public function getSql(): stringGet the SQL statement.
Returns
stringTest cases 1
public function getTableName(): stringGet the name of the table.
Returns
stringTest cases 1
public function getColumnName(): stringGet the name of the column that already exists.
Returns
stringTest cases 1
Private surface 3§
Implementation details, listed for orientation only.
private string $sqlprivate string $tableNameprivate string $columnNameTest cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 5
ExecutionCheck::verifycallsAddColumnResolverTest::testResolveAlterAddColumnRejectsDuplicateColumnIgnoringCasecallsRenameResolverTest::testResolveAlterRenameColumnRejectsExistingTargetNamecallsAlterTableMutationTest::testApplyAddColumnThrowsExceptionWhenColumnExistscallsSqliteMutationResolverTest::testAlterRenameColumnRejectsExistingTargetcalls
Relations§
Instantiated in 3
- new ZtdQuery\Platform\MySql\Shadow\Mutation\Table\Alter\ColumnAlteration::applyAddColumn() packages/ztd-query-mysql/src/Shadow/Mutation/Table/Alter/ColumnAlteration.php:43
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Table\Alter\AddColumnResolver::resolveAlterAddColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Table/Alter/AddColumnResolver.php:48
- new ZtdQuery\Platform\Sqlite\Shadow\Mutation\Table\Alter\RenameResolver::resolveAlterRenameColumn() packages/ztd-query-sqlite/src/Shadow/Mutation/Table/Alter/RenameResolver.php:73