createDrizzleStorage
function createDrizzleStorage(options): DrizzleEntitlementsStorage;Defined in: src/storage/drizzle.ts:78
Create a Drizzle-backed DrizzleEntitlementsStorage. No DDL, no connection ownership.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
DrizzleStorageOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { drizzle } from "drizzle-orm/node-postgres";import { createDrizzleStorage } from "@xtandard/entitlements/storage/drizzle";import { pgEntitlementsTable } from "@xtandard/entitlements/drizzle/pg";
export const entitlementsKv = pgEntitlementsTable(); // add to your schema + migrateconst storage = createDrizzleStorage({ db: drizzle(pool), table: entitlementsKv });