Skip to content

Commit 559abd5

Browse files
Docs for Prisma ORM v6.16.0 (#7096)
* update docs for sql views * Update content/200-orm/100-prisma-schema/20-data-model/40-views.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * add improvements * minor improvements * minor improvements in view docs * polished view docs * update notes about query compiler in ga * update preview feature reference * update management api guide * reworked partner oauth section * add docs for creating oauth apps * deprecate postgres extensions * fix remaining merge conflicts * fix remaining merge conflicts * Update content/200-orm/100-prisma-schema/80-postgresql-extensions.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update content/200-orm/100-prisma-schema/80-postgresql-extensions.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update content/200-orm/200-prisma-client/000-setup-and-configuration/300-no-rust-engine.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix broken links * fix broken tab item * fix broken mdx * add docs for vs code login and direct tcp connections * update query compiler into ga * update driver adapters into ga * update prisma-client generator to ga * add prisma-client example * Update content/200-orm/200-prisma-client/000-setup-and-configuration/300-no-rust-engine.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update content/200-orm/200-prisma-client/000-setup-and-configuration/300-no-rust-engine.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix minor issues * fix broken mdx * fix links * Update content/200-orm/200-prisma-client/000-setup-and-configuration/300-no-rust-engine.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * minor changes * remove note about no login for local ppg management in vs code --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 5d67bd8 commit 559abd5

40 files changed

+610
-580
lines changed

content/200-orm/050-overview/500-databases/200-database-drivers.mdx

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ toc_max_heading_level: 4
88

99
## Default built-in drivers
1010

11-
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.
11+
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.
1212

1313
:::note
1414

15-
As of [v6.7.0](https://pris.ly/release/6.7.0), Prisma ORM has the `queryCompiler` Preview feature.
15+
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).
1616

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

1919
```prisma
2020
generator client {
21-
provider = "prisma-client-js"
22-
previewFeatures = ["queryCompiler", "driverAdapters"]
21+
provider = "prisma-client-js" // or "prisma-client"
22+
output = "../src/generated/prisma"
23+
engineType = "client" // no Rust engine
2324
}
2425
```
2526

26-
> Note that the [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) Preview feature is required alongside `queryCompiler`.
27+
Note that [driver adapters](/orm/overview/databases/database-drivers#driver-adapters) are required if you want to use Prisma ORM without Rust engines.
28+
29+
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.
2730

2831
:::
2932

@@ -63,7 +66,7 @@ You can connect to your database using a Node.js-based driver from Prisma Client
6366
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.
6467

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

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

7679
## How to use driver adapters
7780

78-
To use this feature:
79-
80-
1. Update the `previewFeatures` block in your schema to include the `driverAdapters` Preview feature:
81-
```prisma
82-
generator client {
83-
provider = "prisma-client-js"
84-
previewFeatures = ["driverAdapters"]
85-
}
86-
```
87-
88-
2. Generate Prisma Client:
89-
```terminal
90-
npx prisma generate
91-
```
92-
93-
3. Refer to the following pages to learn more about how to use the specific driver adapters with the specific database providers:
94-
- [PostgreSQL](/orm/overview/databases/postgresql#using-the-node-postgres-driver)
95-
- [MySQL/MariaDB](/orm/overview/databases/mysql#using-the-mariadb-driver)
96-
- [MS SQL Server](/orm/overview/databases/sql-server#using-the-node-mssql-driver)
97-
- [Neon](/orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm-preview)
98-
- [PlanetScale](/orm/overview/databases/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-orm-preview)
99-
- [Turso](/orm/overview/databases/turso#how-to-connect-and-query-a-turso-database)
100-
- [Cloudflare D1](/orm/overview/databases/cloudflare-d1)
81+
Refer to the following pages to learn more about how to use the specific driver adapters with the specific database providers:
82+
- [PostgreSQL](/orm/overview/databases/postgresql#using-the-node-postgres-driver)
83+
- [MySQL/MariaDB](/orm/overview/databases/mysql#using-the-mariadb-driver)
84+
- [MS SQL Server](/orm/overview/databases/sql-server#using-the-node-mssql-driver)
85+
- [Neon](/orm/overview/databases/neon#how-to-use-neons-serverless-driver-with-prisma-orm)
86+
- [PlanetScale](/orm/overview/databases/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-orm-preview)
87+
- [Turso](/orm/overview/databases/turso#how-to-connect-and-query-a-turso-database)
88+
- [Cloudflare D1](/orm/overview/databases/cloudflare-d1)
10189

10290
## Notes about using driver adapters
10391

content/200-orm/050-overview/500-databases/300-postgresql.mdx

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,17 @@ For PostgreSQL, [`node-postgres`](https://node-postgres.com) (`pg`) is one of th
4242

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

45-
### 1. Enable the `driverAdapters` Preview feature flag
45+
### 1. Install the dependencies
4646

47-
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:
48-
49-
```prisma file=schema.prisma
50-
generator client {
51-
provider = "prisma-client-js"
52-
previewFeatures = ["driverAdapters"]
53-
}
54-
55-
datasource db {
56-
provider = "postgresql"
57-
url = env("DATABASE_URL")
58-
}
59-
```
60-
61-
Once you have added the feature flag to your schema, re-generate Prisma Client:
62-
63-
```terminal
64-
npx prisma generate
65-
```
66-
67-
### 2. Install the dependencies
68-
69-
Next, install Prisma ORM's driver adapter for `pg`:
47+
First, install Prisma ORM's driver adapter for `pg`:
7048

7149
```terminal
7250
npm install @prisma/adapter-pg
7351
```
7452

75-
### 3. Instantiate Prisma Client using the driver adapter
53+
### 2. Instantiate Prisma Client using the driver adapter
7654

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

7957
```ts
8058
import { PrismaPg } from '@prisma/adapter-pg'

content/200-orm/050-overview/500-databases/400-mysql.mdx

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,17 @@ For MySQL and MariaDB, [`mariadb`](https://github.com/mariadb-corporation/mariad
3333

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

36-
### 1. Enable the `driverAdapters` Preview feature flag
36+
### 1. Install the dependencies
3737

38-
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:
39-
40-
```prisma file=schema.prisma
41-
generator client {
42-
provider = "prisma-client-js"
43-
previewFeatures = ["driverAdapters"]
44-
}
45-
46-
datasource db {
47-
provider = "mysql"
48-
url = env("DATABASE_URL")
49-
}
50-
```
51-
52-
Once you have added the feature flag to your schema, re-generate Prisma Client:
53-
54-
```terminal
55-
npx prisma generate
56-
```
57-
58-
### 2. Install the dependencies
59-
60-
Next, install Prisma ORM's driver adapter for `mariadb`:
38+
First, install Prisma ORM's driver adapter for `mariadb`:
6139

6240
```terminal
6341
npm install @prisma/adapter-mariadb
6442
```
6543

66-
### 3. Instantiate Prisma Client using the driver adapter
44+
### 2. Instantiate Prisma Client using the driver adapter
6745

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

7048
```ts
7149
import { PrismaMariaDb } from '@prisma/adapter-mariadb';

content/200-orm/050-overview/500-databases/500-sqlite.mdx

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,17 @@ For SQLite, [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) is on
3333

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

36-
### 1. Enable the `driverAdapters` Preview feature flag
36+
### 1. Install the dependencies
3737

38-
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:
39-
40-
```prisma file=schema.prisma
41-
generator client {
42-
provider = "prisma-client-js"
43-
previewFeatures = ["driverAdapters"]
44-
}
45-
46-
datasource db {
47-
provider = "sqlite"
48-
url = env("DATABASE_URL")
49-
}
50-
```
51-
52-
Once you have added the feature flag to your schema, re-generate Prisma Client:
53-
54-
```terminal
55-
npx prisma generate
56-
```
57-
58-
### 2. Install the dependencies
59-
60-
Next, install Prisma ORM's driver adapter for `better-sqlite3`:
38+
First, install Prisma ORM's driver adapter for `better-sqlite3`:
6139

6240
```terminal
6341
npm install @prisma/adapter-better-sqlite3
6442
```
6543

66-
### 3. Instantiate Prisma Client using the driver adapter
44+
### 2. Instantiate Prisma Client using the driver adapter
6745

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

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

80-
81-
8258
## Type mapping between SQLite to Prisma schema
8359

8460
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:

content/200-orm/050-overview/500-databases/800-sql-server/index.mdx

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,17 @@ For SQLite, [`node-mssql`](https://github.com/tediousjs/node-mssql) is one of th
3333

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

36-
### 1. Enable the `driverAdapters` Preview feature flag
36+
### 1. Install the dependencies
3737

38-
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:
39-
40-
```prisma file=schema.prisma
41-
generator client {
42-
provider = "prisma-client-js"
43-
previewFeatures = ["driverAdapters"]
44-
}
45-
46-
datasource db {
47-
provider = "sqlserver"
48-
url = env("DATABASE_URL")
49-
}
50-
```
51-
52-
Once you have added the feature flag to your schema, re-generate Prisma Client:
53-
54-
```terminal
55-
npx prisma generate
56-
```
57-
58-
### 2. Install the dependencies
59-
60-
Next, install Prisma ORM's driver adapter for `node-mssql`:
38+
First, install Prisma ORM's driver adapter for `node-mssql`:
6139

6240
```terminal
6341
npm install @prisma/adapter-mssql
6442
```
6543

66-
### 3. Instantiate Prisma Client using the driver adapter
44+
### 2. Instantiate Prisma Client using the driver adapter
6745

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

7048
```ts
7149
import { PrismaMssql } from '@prisma/adapter-mssql'
@@ -87,9 +65,6 @@ const adapter = new PrismaMssql(config)
8765
const prisma = new PrismaClient({ adapter })
8866
```
8967

90-
91-
92-
9368
## Connection details
9469

9570
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).

content/200-orm/050-overview/500-databases/850-planetscale.mdx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -305,24 +305,10 @@ You can use Prisma ORM along with the PlanetScale serverless driver using the [`
305305

306306
:::info
307307

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

310310
:::
311311

312-
To get started, enable the `driverAdapters` Preview feature flag:
313-
314-
```prisma
315-
generator client {
316-
provider = "prisma-client-js"
317-
previewFeatures = ["driverAdapters"]
318-
}
319-
```
320-
321-
Generate Prisma Client:
322-
323-
```bash
324-
npx prisma generate
325-
```
326312

327313
:::info
328314

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

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

339-
```bash
325+
```terminal
340326
npm install @prisma/adapter-planetscale undici
341327
```
342328

content/200-orm/050-overview/500-databases/890-neon.mdx

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This guide explains how to:
1010

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

1515
## What is Neon?
1616

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

111-
## How to use Neon's serverless driver with Prisma ORM (Preview)
111+
## How to use Neon's serverless driver with Prisma ORM
112112

113113
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.
114114

115115
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.
116116

117117
:::info
118118

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

121121
:::
122122

123-
To get started, enable the `driverAdapters` Preview feature flag:
124-
125-
```prisma
126-
generator client {
127-
provider = "prisma-client-js"
128-
previewFeatures = ["driverAdapters"]
129-
}
130-
131-
datasource db {
132-
provider = "postgresql"
133-
url = env("DATABASE_URL")
134-
}
135-
```
136-
137-
Generate Prisma Client:
138-
139-
```terminal
140-
npx prisma generate
141-
```
142-
143-
Install the Prisma ORM adapter for Neon:
123+
To get started, istall the Prisma ORM adapter for Neon:
144124

145125
```terminal
146126
npm install @prisma/adapter-neon

content/200-orm/050-overview/500-databases/900-turso.mdx

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -83,28 +83,7 @@ TURSO_DATABASE_URL="libsql://turso-prisma-db-user.turso.io"
8383

8484
### How to connect to a Turso database
8585

86-
To get started, enable the `driverAdapters` Preview feature flag:
87-
88-
```prisma highlight=3;add
89-
generator client {
90-
provider = "prisma-client-js"
91-
//add-next-line
92-
previewFeatures = ["driverAdapters"]
93-
}
94-
95-
datasource db {
96-
provider = "sqlite"
97-
url = "file:./dev.db" // will be ignored
98-
}
99-
```
100-
101-
Generate Prisma Client:
102-
103-
```terminal
104-
npx prisma generate
105-
```
106-
107-
Install the Prisma ORM driver adapter for libSQL packages:
86+
To get started, install the Prisma ORM driver adapter for libSQL packages:
10887

10988
```terminal
11089
npm install @prisma/adapter-libsql

0 commit comments

Comments
 (0)