Setu-TS
    Preparing search index...

    Class PrismaAdapter

    Prisma adapter wrapping the official Prisma client.

    The application injects a generated Prisma v7 client through options.prismaClient.

    0.1.0

    Implements

    Index
    • Parameters

      Returns Promise<IAdapterTransaction>

      a two-deferred bridge:

      • txReady — resolves when $transaction hands back the tx client.
      • hold — kept open until commit() / rollback() settles it.

      commit() resolves hold then awaits the outer $transaction promise so commit failures surface. rollback() rejects hold with a private sentinel, then awaits the outer promise swallowing only that sentinel to prevent a Deno-fatal unhandled rejection.

      Prisma interactive transactions have a ~5s default timeout — the bridge holds the callback open for the entire Unit of Work. A custom timeout can be passed through options.transactionTimeout.

    • Liveness probe (M95b §3.5): one SELECT 1 through the injected client's $queryRawUnsafe — the same funnel rawQuery uses, so the probe cannot diverge from the query path. false for an adapter that never connected; false when the round trip fails or is refused, so an outage reads as a fact.

      Returns Promise<boolean>