Skip to content
Closed
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,25 @@ toc_max_heading_level: 4

## Default built-in drivers

One of Prisma Client's components is the [Query Engine](/orm/more/under-the-hood/engines). The Query Engine is responsible for transforming Prisma Client queries into SQL statements. It connects to your database via TCP using built-in drivers that don't require additional setup.
One of Prisma Client's components is the [Query Engine](/orm/more/under-the-hood/engines) (which is implemented in Rust). The Query Engine is responsible for transforming Prisma Client queries into SQL statements. It connects to your database via TCP using built-in drivers that don't require additional setup.

:::note

As of [v6.7.0](https://pris.ly/release/6.7.0), Prisma ORM has the `queryCompiler` Preview feature.
As of [v6.15.0](https://pris.ly/release/6.15.0), Prisma ORM can be used without Rust engines in production applications. Learn more [here](/orm/prisma-client/setup-and-configuration/no-rust-engine).

**When enabled, your Prisma Client will be generated [without a Rust-based query engine binary](/orm/prisma-client/setup-and-configuration/no-rust-engine)**:
**When enabled, your Prisma Client will be generated without a Rust-based query engine binary**:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}
```

> Note that the [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) Preview feature is required alongside `queryCompiler`.
Note that [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) are required if you want to use Prisma ORM without Rust engines.

You can [read about the performance and DX improvements](https://www.prisma.io/blog/prisma-orm-without-rust-latest-performance-benchmarks) of this change on our blog.

:::
Comment on lines +15 to 31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Great addition, plus two follow-ups: output path consistency and preview references later in this doc

  • The GA note and generator example look good. Please standardize the output path across the PR (here it’s ../src/generated/prisma while the main no-Rust-engine guide uses ../generated/prisma).
  • This page still contains “How to use driver adapters” instructions referencing previewFeatures = ["driverAdapters"] (later in the file). That contradicts the GA note above. Update that section to the GA flow (set engineType = "client", generate, install adapter, instantiate).

To locate outdated preview references in this file:

Also verify “preview” anchors in the Serverless adapters section are still valid:


🏁 Script executed:

#!/bin/bash
rg -n -C2 -P 'previewFeatures\s*=\s*\[.*driverAdapters.*\]' content/200-orm/050-overview/500-databases/200-database-drivers.mdx

Length of output: 267


🏁 Script executed:

#!/bin/bash
rg -n -C2 -P 'how-to-use-.*-with-prisma-orm-preview' content/200-orm/050-overview/500-databases/200-database-drivers.mdx

Length of output: 1069


Standardize output path & migrate driver adapters section to GA flow

  • Replace the generator example’s output path to match the main no-Rust-engine guide. In content/200-orm/050-overview/500-databases/200-database-drivers.mdx, change:

    generator client {
      provider   = "prisma-client-js"
  • output = "../src/generated/prisma"

  • output = "../generated/prisma"
    engineType = "client"
    }

- Remove the old `previewFeatures = ["driverAdapters"]` snippet (lines 85–88) and update that block to the GA flow. It should look like:

```prisma
generator client {
  provider   = "prisma-client-js"
  output     = "../generated/prisma"
  engineType = "client"
}

Then follow with “install your adapter and instantiate Prisma Client” steps, rather than the previewFeatures instructions.

  • Update all serverless adapter links (around lines 69–71 and 100–101) to point at the GA anchors—remove the -preview suffix. For example:
    • Neon → /orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm
    • PlanetScale → /orm/overview/databases/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-orm
🤖 Prompt for AI Agents
In content/200-orm/050-overview/500-databases/200-database-drivers.mdx around
lines 15-101, standardize the generator output path, remove the old
previewFeatures snippet, migrate to the GA driver-adapters flow, and update
serverless adapter links: change the generator.example output from
"../src/generated/prisma" to "../generated/prisma"; remove the previewFeatures =
["driverAdapters"] block (lines ~85–88) and replace it with the GA instructions
— a generator block using engineType = "client" and then the steps to install
your adapter and instantiate Prisma Client; and update the serverless adapter
links at the two places around lines ~69–71 and ~100–101 to remove the
"-preview" suffix so Neon and PlanetScale links point to their GA anchors.


Expand Down
31 changes: 17 additions & 14 deletions content/200-orm/100-prisma-schema/10-overview/03-generators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A generator determines which assets are created when you run the `prisma generat
There are two generators for Prisma Client:

- `prisma-client-js`: Generates Prisma Client into `node_modules`
- `prisma-client` ([Preview](/orm/more/releases#preview)): Newer and more flexible version of `prisma-client-js` with ESM support; it outputs plain TypeScript code and _requires_ a custom `output` path (read more about it [here](https://www.prisma.io/blog/why-prisma-orm-generates-code-into-node-modules-and-why-it-ll-change))
- `prisma-client`: Newer and more flexible version of `prisma-client-js` with ESM support; it outputs plain TypeScript code and _requires_ a custom `output` path (read more about it [here](https://www.prisma.io/blog/why-prisma-orm-generates-code-into-node-modules-and-why-it-ll-change))

Alternatively, you can configure any npm package that complies with our generator specification.

Expand All @@ -45,20 +45,23 @@ generator client {

:::note

As of [v6.7.0](https://pris.ly/release/6.7.0), Prisma ORM has the `queryCompiler` Preview feature.
As of [v6.15.0](https://pris.ly/release/6.15.0), Prisma ORM can be used without Rust engines in production applications. Learn more [here](/orm/prisma-client/setup-and-configuration/no-rust-engine).

**When enabled, your Prisma Client will be generated [without a Rust-based query engine binary](/orm/prisma-client/setup-and-configuration/no-rust-engine)**:
**When enabled, your Prisma Client will be generated without a Rust-based query engine binary**:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}
```

Note that the [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) Preview feature is required alongside `queryCompiler`.
Note that [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) are required if you want to use Prisma ORM without Rust engines.

When using Prisma ORM without Rust, the `binaryTargets` field is obsolete and not needed.

When using the `queryCompiler` Preview feature, the `binaryTargets` field is obsolete and not needed.
You can [read about the performance and DX improvements](https://www.prisma.io/blog/prisma-orm-without-rust-latest-performance-benchmarks) of this change on our blog.

:::

Expand All @@ -85,23 +88,23 @@ If you use macOS ARM64 (`darwin-arm64`), then the binary file that was compiled

> **Note**: The `native` binary target is the default. You can set it explicitly if you wish to include additional [binary targets](/orm/reference/prisma-schema-reference#binarytargets-options) for deployment to different environments.

## `prisma-client` (Preview)
## `prisma-client`

The new `prisma-client` generator offers greater control and flexibility when using Prisma ORM across different JavaScript environments (such as ESM, Bun, Deno, ...).

It generates Prisma Client into a custom directory in your application's codebase that's specified via the `output` field on the `generator` block. This gives you full visibility and control over the generated code. It also [splits](#output-splitting-and-importing-types) the generated Prisma Client library into multiple files.

Currently in [Preview](/orm/more/releases#preview), this generator ensures you can bundle your application code exactly the way you want, without relying on hidden or automatic behaviors.
This generator ensures you can bundle your application code exactly the way you want, without relying on hidden or automatic behaviors.

Here are the main differences compared to `prisma-client-js`:

- Requires an `output` path; no magic generation into `node_modules` any more
- Does not load `.env` at run time; use `dotenv` or set environment variables manually
- Requires an `output` path; no "magic" generation into `node_modules` any more
- Doesn't load `.env` at runtime; use `dotenv` or set environment variables manually instead
- Supports ESM and CommonJS via the `moduleFormat` field
- More flexible thanks to additional fields
- More flexible thanks to additional [fields](#field-reference)
- Outputs plain TypeScript that's bundled just like the rest of your application code

The `prisma-client` generator will become the new default with Prisma ORM v7.
The `prisma-client` generator has been Generally Available since [v6.15.0](https://pris.ly/releases/6.15.0) will become the new default with Prisma ORM v7.

### Getting started

Expand Down Expand Up @@ -138,7 +141,7 @@ Then `../src/generated/prisma` places the generated code in `src/generated/prism

Generate Prisma Client by running:

```bash
```terminal
npx prisma generate
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ Relational database connectors use Prisma ORM's own connection pool, and the Mon

:::note

As of [v6.7.0](https://pris.ly/release/6.7.0), Prisma ORM has the `queryCompiler` Preview feature.
As of [v6.15.0](https://pris.ly/release/6.15.0), Prisma ORM can be used without Rust engines in production applications. Learn more [here](/orm/prisma-client/setup-and-configuration/no-rust-engine).

**When enabled, your Prisma Client will be generated [without a Rust-based query engine binary](/orm/prisma-client/setup-and-configuration/no-rust-engine)**:
**When enabled, your Prisma Client will be generated without a Rust-based query engine binary**:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}
```

Note that the [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) Preview feature is required alongside `queryCompiler`. When using the `queryCompiler` Preview feature, the connection pool is maintained by the native JS database driver you're using.
Note that [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) are required if you want to use Prisma ORM without Rust engines. In this scenario, the connection pool is maintained by the native JS database driver you're using.

You can [read about the performance and DX improvements](https://www.prisma.io/blog/prisma-orm-without-rust-latest-performance-benchmarks) of this change on our blog.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,21 @@

:::note

As of [v6.7.0](https://pris.ly/release/6.7.0), Prisma ORM has the `queryCompiler` Preview feature.
As of [v6.15.0](https://pris.ly/release/6.15.0), Prisma ORM can be used without Rust engines in production applications. Learn more [here](/orm/prisma-client/setup-and-configuration/no-rust-engine).

Check failure on line 270 in content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/index.mdx

View workflow job for this annotation

GitHub Actions / runner / linkspector

[Linkspector] reported by reviewdog 🐶 Cannot reach https://pris.ly/release/6.15.0 Status: 500 Raw Output: message:"Cannot reach https://pris.ly/release/6.15.0 Status: 500" location:{path:"content/200-orm/200-prisma-client/000-setup-and-configuration/050-databases-connections/index.mdx" range:{start:{line:270 column:7} end:{line:270 column:48}}} severity:ERROR source:{name:"linkspector" url:"https://github.com/UmbrellaDocs/linkspector"}

**When enabled, your Prisma Client will be generated [without a Rust-based query engine binary](/orm/prisma-client/setup-and-configuration/no-rust-engine)**:
**When enabled, your Prisma Client will be generated without a Rust-based query engine binary**:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}
```

Note that the [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) Preview feature is required alongside `queryCompiler`. When using the `queryCompiler` Preview feature, the connection pool size is set via the native JS driver you are using.
Note that [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) are required if you want to use Prisma ORM without Rust engines. In this scenario, the connection pool size is set via the native JS driver you are using.

You can [read about the performance and DX improvements](https://www.prisma.io/blog/prisma-orm-without-rust-latest-performance-benchmarks) of this change on our blog.

:::

Expand Down
Loading
Loading