Optional ReadonlydrizzleInject the application's opaque configured Drizzle database, created by
createDrizzleDatabase(database, transactionBridge). Required when
type: 'drizzle' — see DrizzleAdapterOptions, which makes that
a compile error rather than a startup throw. The explicit bridge positively
guarantees Promise-aware native callback semantics instead of inferring
them from a structural transaction method.
Optional ReadonlydrizzleRegistry mapping entity name → a real Drizzle table definition. Required
when type: 'drizzle' — see DrizzleAdapterOptions, which makes
that a compile error rather than a startup throw.
The registry accepts any table definition, including one with a composite
primary key. An id column is a REPOSITORY precondition (findById,
update and delete are single-key by contract), so it is checked when a
repository is asked for rather than at connect() — a table registered
only so the typed query builder can name it needs none.
Optional ReadonlyentitiesPer-entity overrides for key resolution and other model-specific tuning.
The only override exercised today is compositeKeyName on entities that
carry a named @@id constraint — Prisma generates the field name from the
name: argument rather than joining column names with _, so the derived
name is wrong for such models. Setting the override tells the adapter the
correct field to address in the compound-key where argument.
Optional ReadonlylogWhen true, log SQL queries to the registered logger.
ReadonlyprismaThe application-generated Prisma v7 client. Required — a framework package
cannot locate an application-selected generated-client output path, and
PrismaAdapter.connect() rejects without it.
Optional ReadonlyproviderThe SQL connector the injected Prisma client is bound to.
Only contains is connector-sensitive in the Prisma adapter. When omitted
the adapter reads the client's active provider structurally at
connect() time; when that cannot be determined, a contains filter
throws UnsupportedFilterOperatorError naming this option as the fix.
Pass it explicitly when the adapter cannot detect the connector.
Optional ReadonlytransactionTimeout (ms) for Prisma interactive transactions. Defaults to 30_000. Prisma's default is ~5s which is too short for a full Unit of Work.
Read by the Prisma adapter only; Memory and Drizzle ignore it.
Optional ReadonlyurlDatabase connection URL (e.g., postgresql://localhost:5432/mydb).
Prisma v7 clients are generated at an application-selected
output path and receive their connection configuration when the
application constructs them. Inject that generated client through
prismaClient instead. This field remains for source compatibility and
is not read by the Prisma adapter.
DatabaseAdapterOptionsnarrowed for the Prisma arm: the injected client is required.Since
0.2.0