Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
d6b1bb3
update docs for sql views
nikolasburk Aug 7, 2025
6547b29
Update content/200-orm/100-prisma-schema/20-data-model/40-views.mdx
nikolasburk Aug 7, 2025
07b270a
add improvements
nikolasburk Aug 7, 2025
cead47b
Merge branch 'docs/6.14.0' of github.com:prisma/docs into docs/6.14.0
nikolasburk Aug 7, 2025
d971a75
minor improvements
nikolasburk Aug 7, 2025
95620a8
minor improvements in view docs
nikolasburk Aug 7, 2025
bf51ce6
polished view docs
nikolasburk Aug 12, 2025
1d2afdc
update notes about query compiler in ga
nikolasburk Aug 15, 2025
89631fa
fix merge conflicts
nikolasburk Aug 15, 2025
604eb59
update preview feature reference
nikolasburk Aug 15, 2025
2514cca
update management api guide
nikolasburk Aug 18, 2025
1bdecb6
reworked partner oauth section
nikolasburk Aug 18, 2025
12ea903
add docs for creating oauth apps
nikolasburk Aug 18, 2025
3fad666
deprecate postgres extensions
nikolasburk Sep 2, 2025
3208b24
resolve merge conflict
nikolasburk Sep 2, 2025
03d4da0
fix remaining merge conflicts
nikolasburk Sep 2, 2025
62a4bbd
Merge branch 'main' into docs/6.16.0
nikolasburk Sep 2, 2025
be83cf2
fix remaining merge conflicts
nikolasburk Sep 2, 2025
cdf1558
Merge branch 'docs/6.16.0' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 2, 2025
caed9fb
Update content/200-orm/100-prisma-schema/80-postgresql-extensions.mdx
nikolasburk Sep 2, 2025
1569814
Update content/200-orm/100-prisma-schema/80-postgresql-extensions.mdx
nikolasburk Sep 2, 2025
fc1c971
Update content/200-orm/200-prisma-client/000-setup-and-configuration/…
nikolasburk Sep 2, 2025
fc2dee5
fix broken links
nikolasburk Sep 3, 2025
533428e
Merge branch 'docs/6.16.0' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 3, 2025
706c2ec
fix broken tab item
nikolasburk Sep 3, 2025
a438d2e
fix broken mdx
nikolasburk Sep 3, 2025
acfe3df
add docs for vs code login and direct tcp connections
nikolasburk Sep 3, 2025
206d2ed
update query compiler into ga
nikolasburk Sep 3, 2025
7b39a6e
update driver adapters into ga
nikolasburk Sep 3, 2025
751b2c7
update prisma-client generator to ga
nikolasburk Sep 3, 2025
6eb0276
add prisma-client example
nikolasburk Sep 3, 2025
7a11f13
Update content/200-orm/200-prisma-client/000-setup-and-configuration/…
nikolasburk Sep 3, 2025
a6093ed
Update content/200-orm/200-prisma-client/000-setup-and-configuration/…
nikolasburk Sep 3, 2025
23c534f
Apply suggestions from code review
nikolasburk Sep 3, 2025
41f1200
fix minor issues
nikolasburk Sep 3, 2025
119edd8
Merge branch 'docs/6.16.0' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 3, 2025
9f1a436
Merge branch 'main' into docs/6.16.0
nikolasburk Sep 3, 2025
9b98e6c
fix broken mdx
nikolasburk Sep 3, 2025
2cb83f4
Merge branch 'docs/6.16.0' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 3, 2025
80b3f79
fix links
nikolasburk Sep 3, 2025
6c0b3cc
Update content/200-orm/200-prisma-client/000-setup-and-configuration/…
nikolasburk Sep 3, 2025
edf852b
Merge branch 'main' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 9, 2025
0f373b2
Merge branch 'main' into docs/6.16.0
nikolasburk Sep 9, 2025
460bdea
minor changes
nikolasburk Sep 9, 2025
fbfaf11
Merge branch 'docs/6.16.0' of github.com:prisma/docs into docs/6.16.0
nikolasburk Sep 10, 2025
a263b4b
remove note about no login for local ppg management in vs code
nikolasburk Sep 10, 2025
506d54c
Merge branch 'main' into docs/6.16.0
nikolasburk Sep 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 18 additions & 30 deletions content/200-orm/050-overview/500-databases/200-database-drivers.mdx
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.16.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.

:::

Expand Down Expand Up @@ -63,7 +66,7 @@ You can connect to your database using a Node.js-based driver from Prisma Client
Database providers, such as Neon and PlanetScale, allow you to connect to your database using other protocols besides TCP, such as HTTP and WebSockets. These database drivers are optimized for connecting to your database in serverless and edge environments.

Prisma ORM maintains the following serverless driver adapters:
- [Neon](/orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm-preview) (and Vercel Postgres)
- [Neon](/orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm) (and Vercel Postgres)
- [PlanetScale](/orm/overview/databases/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-orm-preview)
- [Cloudflare D1](/orm/overview/databases/cloudflare-d1)

Expand All @@ -75,29 +78,14 @@ You can also build your own driver adapter for the database you're using. The fo

## How to use driver adapters

To use this feature:

1. Update the `previewFeatures` block in your schema to include the `driverAdapters` Preview feature:
```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
```

2. Generate Prisma Client:
```terminal
npx prisma generate
```

3. Refer to the following pages to learn more about how to use the specific driver adapters with the specific database providers:
- [PostgreSQL](/orm/overview/databases/postgresql#using-the-node-postgres-driver)
- [MySQL/MariaDB](/orm/overview/databases/mysql#using-the-mariadb-driver)
- [MS SQL Server](/orm/overview/databases/sql-server#using-the-node-mssql-driver)
- [Neon](/orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm-preview)
- [PlanetScale](/orm/overview/databases/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-orm-preview)
- [Turso](/orm/overview/databases/turso#how-to-connect-and-query-a-turso-database)
- [Cloudflare D1](/orm/overview/databases/cloudflare-d1)
Refer to the following pages to learn more about how to use the specific driver adapters with the specific database providers:
- [PostgreSQL](/orm/overview/databases/postgresql#using-the-node-postgres-driver)
- [MySQL/MariaDB](/orm/overview/databases/mysql#using-the-mariadb-driver)
- [MS SQL Server](/orm/overview/databases/sql-server#using-the-node-mssql-driver)
- [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-preview)
- [Turso](/orm/overview/databases/turso#how-to-connect-and-query-a-turso-database)
- [Cloudflare D1](/orm/overview/databases/cloudflare-d1)

## Notes about using driver adapters

Expand Down
30 changes: 4 additions & 26 deletions content/200-orm/050-overview/500-databases/300-postgresql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,17 @@ For PostgreSQL, [`node-postgres`](https://node-postgres.com) (`pg`) is one of th

This section explains how you can use it with Prisma ORM and the `@prisma/adapter-pg` driver adapter.

### 1. Enable the `driverAdapters` Preview feature flag
### 1. Install the dependencies

Since driver adapters are currently in [Preview](/orm/more/releases#preview), you need to enable its feature flag on the `datasource` block in your Prisma schema:

```prisma file=schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
```

Once you have added the feature flag to your schema, re-generate Prisma Client:

```terminal
npx prisma generate
```

### 2. Install the dependencies

Next, install Prisma ORM's driver adapter for `pg`:
First, install Prisma ORM's driver adapter for `pg`:

```terminal
npm install @prisma/adapter-pg
```

### 3. Instantiate Prisma Client using the driver adapter
### 2. Instantiate Prisma Client using the driver adapter

Finally, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:
Now, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:

```ts
import { PrismaPg } from '@prisma/adapter-pg'
Expand Down
30 changes: 4 additions & 26 deletions content/200-orm/050-overview/500-databases/400-mysql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,17 @@ For MySQL and MariaDB, [`mariadb`](https://github.com/mariadb-corporation/mariad

This section explains how you can use it with Prisma ORM and the `@prisma/adapter-mariadb` driver adapter.

### 1. Enable the `driverAdapters` Preview feature flag
### 1. Install the dependencies

Since driver adapters are currently in [Preview](/orm/more/releases#preview), you need to enable its feature flag on the `datasource` block in your Prisma schema:

```prisma file=schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
```

Once you have added the feature flag to your schema, re-generate Prisma Client:

```terminal
npx prisma generate
```

### 2. Install the dependencies

Next, install Prisma ORM's driver adapter for `mariadb`:
First, install Prisma ORM's driver adapter for `mariadb`:

```terminal
npm install @prisma/adapter-mariadb
```

### 3. Instantiate Prisma Client using the driver adapter
### 2. Instantiate Prisma Client using the driver adapter

Finally, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:
Now, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:

```ts
import { PrismaMariaDb } from '@prisma/adapter-mariadb';
Expand Down
32 changes: 4 additions & 28 deletions content/200-orm/050-overview/500-databases/500-sqlite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,17 @@ For SQLite, [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) is on

This section explains how you can use it with Prisma ORM and the `@prisma/adapter-better-sqlite3` driver adapter.

### 1. Enable the `driverAdapters` Preview feature flag
### 1. Install the dependencies

Since driver adapters are currently in [Preview](/orm/more/releases#preview), you need to enable its feature flag on the `datasource` block in your Prisma schema:

```prisma file=schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
```

Once you have added the feature flag to your schema, re-generate Prisma Client:

```terminal
npx prisma generate
```

### 2. Install the dependencies

Next, install Prisma ORM's driver adapter for `better-sqlite3`:
First, install Prisma ORM's driver adapter for `better-sqlite3`:

```terminal
npm install @prisma/adapter-better-sqlite3
```

### 3. Instantiate Prisma Client using the driver adapter
### 2. Instantiate Prisma Client using the driver adapter

Finally, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:
Now, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:

```ts
import { PrismaBetterSQLite3 } from '@prisma/adapter-better-sqlite3';
Expand All @@ -77,8 +55,6 @@ const adapter = new PrismaBetterSQLite3({
const prisma = new PrismaClient({ adapter });
```



## Type mapping between SQLite to Prisma schema

The SQLite connector maps the [scalar types](/orm/prisma-schema/data-model/models#scalar-fields) from the [data model](/orm/prisma-schema/data-model/models) to native column types as follows:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,17 @@ For SQLite, [`node-mssql`](https://github.com/tediousjs/node-mssql) is one of th

This section explains how you can use it with Prisma ORM and the `@prisma/adapter-mssql` driver adapter.

### 1. Enable the `driverAdapters` Preview feature flag
### 1. Install the dependencies

Since driver adapters are currently in [Preview](/orm/more/releases#preview), you need to enable its feature flag on the `datasource` block in your Prisma schema:

```prisma file=schema.prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "sqlserver"
url = env("DATABASE_URL")
}
```

Once you have added the feature flag to your schema, re-generate Prisma Client:

```terminal
npx prisma generate
```

### 2. Install the dependencies

Next, install Prisma ORM's driver adapter for `node-mssql`:
First, install Prisma ORM's driver adapter for `node-mssql`:

```terminal
npm install @prisma/adapter-mssql
```

### 3. Instantiate Prisma Client using the driver adapter
### 2. Instantiate Prisma Client using the driver adapter

Finally, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:
Now, when you instantiate Prisma Client, you need to pass an instance of Prisma ORM's driver adapter to the `PrismaClient` constructor:

```ts
import { PrismaMssql } from '@prisma/adapter-mssql'
Expand All @@ -87,9 +65,6 @@ const adapter = new PrismaMssql(config)
const prisma = new PrismaClient({ adapter })
```




## Connection details

The connection URL used to connect to an Microsoft SQL Server database follows the [JDBC standard](https://learn.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15).
Expand Down
18 changes: 2 additions & 16 deletions content/200-orm/050-overview/500-databases/850-planetscale.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -305,24 +305,10 @@ You can use Prisma ORM along with the PlanetScale serverless driver using the [`

:::info

This feature is available in Preview from Prisma ORM versions 5.4.2 and later.
This feature has been Generally Available since Prisma ORM [v6.16.0](https://pris.ly/release/6.16.0).

:::

To get started, enable the `driverAdapters` Preview feature flag:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}
```

Generate Prisma Client:

```bash
npx prisma generate
```

:::info

Expand All @@ -336,7 +322,7 @@ DATABASE_URL='mysql://johndoe:[email protected]/clear_nights

Install the Prisma ORM adapter for PlanetScale, PlanetScale serverless driver and `undici` packages:

```bash
```terminal
npm install @prisma/adapter-planetscale undici
```

Expand Down
28 changes: 4 additions & 24 deletions content/200-orm/050-overview/500-databases/890-neon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This guide explains how to:

- [Connect Prisma ORM using Neon's connection pooling feature](#how-to-use-neons-connection-pooling)
- [Resolve connection timeout issues](#resolving-connection-timeouts)
- [Use Neon's serverless driver with Prisma ORM](#how-to-use-neons-serverless-driver-with-prisma-orm-preview)
- [Use Neon's serverless driver with Prisma ORM](#how-to-use-neons-serverless-driver-with-prisma-orm)

## What is Neon?

Expand Down Expand Up @@ -108,39 +108,19 @@ Another possible cause of connection timeouts is Prisma ORM's [connection pool](
DATABASE_URL=postgres://daniel:<password>@ep-mute-rain-952417.us-east-2.aws.neon.tech/neondb?connect_timeout=15&pool_timeout=15
```

## How to use Neon's serverless driver with Prisma ORM (Preview)
## How to use Neon's serverless driver with Prisma ORM

The [Neon serverless driver](https://github.com/neondatabase/serverless) is a low-latency Postgres driver for JavaScript and TypeScript that allows you to query data from serverless and edge environments over HTTP or WebSockets in place of TCP.

You can use Prisma ORM along with the Neon serverless driver using a [driver adapter](/orm/overview/databases/database-drivers#driver-adapters) . A driver adapter allows you to use a different database driver from the default Prisma ORM provides to communicate with your database.

:::info

This feature is available in Preview from Prisma ORM versions 5.4.2 and later.
This feature has been Generally Available since Prisma ORM [v6.16.0](https://pris.ly/release/6.16.0).

:::

To get started, enable the `driverAdapters` Preview feature flag:

```prisma
generator client {
provider = "prisma-client-js"
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
```

Generate Prisma Client:

```terminal
npx prisma generate
```

Install the Prisma ORM adapter for Neon:
To get started, istall the Prisma ORM adapter for Neon:

```terminal
npm install @prisma/adapter-neon
Expand Down
23 changes: 1 addition & 22 deletions content/200-orm/050-overview/500-databases/900-turso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,7 @@ TURSO_DATABASE_URL="libsql://turso-prisma-db-user.turso.io"

### How to connect to a Turso database

To get started, enable the `driverAdapters` Preview feature flag:

```prisma highlight=3;add
generator client {
provider = "prisma-client-js"
//add-next-line
previewFeatures = ["driverAdapters"]
}

datasource db {
provider = "sqlite"
url = "file:./dev.db" // will be ignored
}
```

Generate Prisma Client:

```terminal
npx prisma generate
```

Install the Prisma ORM driver adapter for libSQL packages:
To get started, install the Prisma ORM driver adapter for libSQL packages:

```terminal
npm install @prisma/adapter-libsql
Expand Down
Loading
Loading