KeyCollisionError
Defined in: src/storage/drizzle.ts:157
Thrown by setItem on MySQL when the key column’s collation is PAD SPACE (utf8mb4_bin) and the
key differs from a stored key only by trailing spaces ("a " vs "a"): the write is refused
instead of overwriting the other key. The message carries the migration SQL to a NO PAD
collation (utf8mb4_0900_bin).
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new KeyCollisionError( key, storedKey, table, subpath?): KeyCollisionError;Defined in: src/storage/drizzle.ts:163
Parameters
Section titled “Parameters”| Parameter | Type | Default value |
|---|---|---|
key |
string |
undefined |
storedKey |
string | undefined |
undefined |
table |
DrizzleKvTable |
undefined |
subpath? |
string |
SUBPATH |
Returns
Section titled “Returns”KeyCollisionError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
key |
readonly |
string |
The key that was written. | src/storage/drizzle.ts:159 |
storedKey |
readonly |
string | undefined |
The stored key it collides with (when it could be read back). | src/storage/drizzle.ts:161 |