final class DuplicateKeyException<TValue>
    extends SimulationException

Exception thrown when a PRIMARY KEY or UNIQUE constraint is violated.

A refusal says what it is about without naming the schema it came from, so the key values it carries are spelled out here rather than imported.

Type Aliases§

KeyValues = array<string, TValue>

Methods§

public function getSql(): string

Get the SQL statement.

Returns

string
Test cases 1
public function getTableName(): string

Get the name of the table.

Returns

string
Test cases 1
public function getKeyName(): string

Get the name of the key constraint.

Returns

string
Test cases 1
public function getKeyValues(): KeyValues

Get the duplicate key values.

Returns

Test cases 1

Private surface 4§

Implementation details, listed for orientation only.

private string $sql
private string $tableName
private string $keyName
private KeyValues $keyValues

Test cases 16§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 10
Other tests reaching this symbol 6

Relations§

Instantiated in 3