Setu-TS
    Preparing search index...

    Interface DatabaseAdapterOptions

    Adapter-specific configuration passed to the database adapter.

    0.1.0

    interface DatabaseAdapterOptions {
        drizzleInstance?: DrizzleDatabaseIdentity;
        drizzleTables?: Record<string, unknown>;
        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

    logQueries?: boolean

    When true, log SQL queries to the registered logger.

    0.1.0

    prismaClient?: unknown

    Inject an application-generated Prisma v7 client. This is required for the Prisma adapter because generated-client output belongs to the application rather than this package — see PrismaAdapterOptions, which makes that a compile error rather than a startup throw.

    A Prisma 7 client needs a driver adapter of its own (new PrismaClient({ adapter: new PrismaPg({ connectionString }) })); the engine-bundled new PrismaClient() constructor was removed in v7.

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