Setu-TS
    Preparing search index...

    Interface PrismaAdapterOptions

    DatabaseAdapterOptions narrowed for the Prisma arm: the injected client is required.

    0.2.0

    interface PrismaAdapterOptions {
        drizzleInstance?: DrizzleDatabaseIdentity;
        drizzleTables?: Record<string, unknown>;
        entities?: Readonly<Record<string, PrismaCompositeKeyOptions>>;
        logQueries?: boolean;
        prismaClient: unknown;
        provider?: PrismaSqlProvider;
        transactionTimeout?: number;
        url?: string;
    }

    Hierarchy (View Summary)

    Index
    drizzleInstance?: DrizzleDatabaseIdentity

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

    0.1.0

    drizzleTables?: Record<string, unknown>

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

    0.1.0

    entities?: Readonly<Record<string, PrismaCompositeKeyOptions>>

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

    new PrismaAdapter({
    prismaClient,
    entities: {
    Enrollment: { compositeKeyName: 'enrollmentKey' },
    },
    });

    0.2.0

    logQueries?: boolean

    When true, log SQL queries to the registered logger.

    0.1.0

    prismaClient: unknown

    The application-generated Prisma v7 client. Required — a framework package cannot locate an application-selected generated-client output path, and PrismaAdapter.connect() rejects without it.

    0.2.0

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

    0.2.0

    transactionTimeout?: number

    Timeout (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.

    0.1.0

    url?: string

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

    0.1.0