@xtandard/kit/storage/drizzle
@xtandard/kit/storage/drizzle — storage over a Drizzle table and database you own (Postgres,
MySQL or SQLite): no DDL, no connection of its own, single-statement compare-and-swap.
Optional peer: drizzle-orm (loaded on first use; build the table with
@xtandard/kit/drizzle/{pg,mysql,sqlite}).
import { … } from "@xtandard/kit/storage/drizzle";Functions
Section titled “Functions”| Name | Summary |
|---|---|
createDrizzleStorage |
Create a Drizzle-backed DrizzleKvStorage. No DDL, no connection ownership. |
Classes
Section titled “Classes”| Name | Summary |
|---|---|
KeyCollisionError |
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). |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
DrizzleStorageOptions |
Options for createDrizzleStorage. |
Type aliases
Section titled “Type aliases”| Name | Summary |
|---|---|
DrizzleKvStorage |
A compare-and-swap capable storage over a Drizzle table. For change notifications, compose it with withWatch and a change source such as pgListenNotify. |
Re-exports
Section titled “Re-exports”| Name | Documented on |
|---|---|
DrizzleDialect |
@xtandard/kit/storage/drizzle/internals |
DrizzleKvTable |
@xtandard/kit/drizzle/mysql |