Overview

A driver adapter is the database connector the Prisma client uses to talk to your database. Prisma 7 removed the Rust query engine that previously held its own connection logic, so the client now delegates connections to a JavaScript database driver wrapped in an adapter. Constructing new PrismaClient() without an adapter throws at runtime. This page covers which adapter to pick, how to install it, and how to wire it into the client. For the singleton pattern that holds the client, see prisma-client.

Install the adapter that matches your database

The adapter wraps the native driver for your engine. Install both packages.

# Postgres
npm install @prisma/adapter-pg pg
 
# SQLite, Turso, or libSQL
npm install @prisma/adapter-libsql @libsql/client
 
# PlanetScale / MySQL over HTTP
npm install @prisma/adapter-planetscale @planetscale/database
  • Use @prisma/adapter-pg for any postgres server, including Supabase and Neon over a direct connection.
  • Use @prisma/adapter-libsql for local sqlite files, Turso, and Cloudflare D1-style libSQL endpoints.
  • Use @prisma/adapter-planetscale or @prisma/adapter-mariadb for the matching hosted MySQL providers.
  • The adapter package version should track your prisma and client version. Mismatched majors fail to load.

Pass the adapter to the client constructor

The adapter is constructed with the connection details, then handed to PrismaClient.

import { PrismaClient } from "./generated/prisma/client"
import { PrismaPg } from "@prisma/adapter-pg"
 
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
export const prisma = new PrismaClient({ adapter })
// SQLite / libSQL
import { PrismaLibSQL } from "@prisma/adapter-libsql"
 
const adapter = new PrismaLibSQL({ url: process.env.DATABASE_URL })
export const prisma = new PrismaClient({ adapter })
  • The adapter owns the connection string. You no longer need to duplicate the URL in a datasources override.
  • Build the adapter once, alongside the singleton client. Do not create a new adapter per request. See prisma-client for the singleton module.

Configure pool sizing on the adapter, not the URL engine flags

With the Rust engine gone, pool limits live on the underlying driver, which reads them from the connection string passed to the adapter.

  • @prisma/adapter-pg honors connection_limit and pool_timeout query parameters on the connectionString.
  • Keep ?pgbouncer=true on the URL when you front Postgres with PgBouncer in transaction mode; it disables prepared-statement reuse the same way it did before. See prisma-pooling for the full pooling matrix.
  • For Postgres 18 servers, the adapter benefits from the new async I/O subsystem without any client-side change.

Skip the adapter only for HTTP-based proxies

The single case where new PrismaClient() takes no driver adapter is a managed HTTP proxy that supplies the connection itself.

  • Prisma Accelerate connects over HTTP via withAccelerate(). The extension replaces the adapter. See prisma-pooling.
  • Every direct-to-database client still needs an adapter. When in doubt, pass one.