Skip to content

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).

  • Error
new KeyCollisionError(
key,
storedKey,
table,
subpath?
): KeyCollisionError;

Defined in: src/storage/drizzle.ts:163

Parameter Type Default value
key string undefined
storedKey string | undefined undefined
table DrizzleKvTable undefined
subpath? string SUBPATH

KeyCollisionError

Error.constructor

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