You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using pnpm 10+ with `pnpx`, you'll need the [`--allow-build=better-sqlite3`](https://pnpm.io/cli/dlx#--allow-build) flag when running Prisma Studio due to SQLite's native dependency requirements.
36
+
:::
37
+
34
38
Here's what each package does:
35
39
36
40
-**`prisma`** - The Prisma CLI for running commands like `prisma init`, `prisma migrate`, and `prisma generate`
@@ -267,9 +271,25 @@ You should see the created user and all users printed to the console!
267
271
268
272
:::note[SQLite requirements for Prisma Studio]
269
273
- File paths must have a `file:` protocol right now in the database url for SQLite
270
-
- Node.js 22.5+: Works out of the box with the built-in `node:sqlite` module
271
-
- Node.js 20: Requires installing `better-sqlite3` as a dependency
272
-
- If using pnpm 10+, you'll also need to allow the `better-sqlite3` install script
274
+
-**Node.js 22.5+**: Works out of the box with the built-in `node:sqlite` module
275
+
- May require `NODE_OPTIONS=--experimental-sqlite` environment variable
276
+
-**Node.js 20**: Requires installing `better-sqlite3` as a dependency
277
+
- If using pnpm 10+ with `pnpx`, you'll need the [`--allow-build=better-sqlite3`](https://pnpm.io/cli/dlx#--allow-build) flag
278
+
-**Deno >= 2.2**: Supported via [built-in SQLite module](https://docs.deno.com/api/node/sqlite/)
279
+
-**Bun**: Support for Prisma Studio with SQLite is coming soon and is not available yet
280
+
281
+
:::tip[Using `npx` with `better-sqlite3`]
282
+
283
+
If you don't have `node:sqlite` available in your runtime or prefer not to install `better-sqlite3` as a hard dependency (it adds ~10MB), you can use `npx` to temporarily install the required packages:
284
+
285
+
```terminal
286
+
npx -p better-sqlite3 -p prisma prisma studio --url file:./dev.db
287
+
```
288
+
289
+
This command:
290
+
- Temporarily installs `better-sqlite3` without adding it to your project dependencies
291
+
- Runs Prisma Studio with the specified SQLite database file
292
+
- Avoids the 10MB overhead of `better-sqlite3` in your project
Copy file name to clipboardExpand all lines: content/100-getting-started/02-prisma-orm/200-add-to-existing-project/200-sqlite.mdx
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,9 +252,25 @@ This command will:
252
252
:::note[SQLite requirements for Prisma Studio]
253
253
254
254
- File paths must have a `file:` protocol right now in the database url for SQLite
255
-
- Node.js 22.5+: Works out of the box with the built-in `node:sqlite` module
256
-
- Node.js 20: Requires installing `better-sqlite3` as a dependency
257
-
- If using pnpm 10+, you'll also need to allow the `better-sqlite3` install script
255
+
-**Node.js 22.5+**: Works out of the box with the built-in `node:sqlite` module
256
+
- May require `NODE_OPTIONS=--experimental-sqlite` environment variable
257
+
-**Node.js 20**: Requires installing `better-sqlite3` as a dependency
258
+
- If using pnpm 10+ with `pnpx`, you'll need the [`--allow-build=better-sqlite3`](https://pnpm.io/cli/dlx#--allow-build) flag
259
+
-**Deno >= 2.2**: Supported via [built-in SQLite module](https://docs.deno.com/api/node/sqlite/)
260
+
-**Bun**: Support for Prisma Studio with SQLite is coming soon and is not available yet
261
+
262
+
:::tip[Using `npx` with `better-sqlite3`]
263
+
264
+
If you don't have `node:sqlite` available in your runtime or prefer not to install `better-sqlite3` as a hard dependency (it adds ~10MB), you can use `npx` to temporarily install the required packages:
265
+
266
+
```terminal
267
+
npx -p better-sqlite3 -p prisma prisma studio --url file:./path/to/your/database.db
268
+
```
269
+
270
+
This command:
271
+
- Temporarily installs `better-sqlite3` without adding it to your project dependencies
272
+
- Runs Prisma Studio with the specified SQLite database file
273
+
- Avoids the 10MB overhead of `better-sqlite3` in your project
Copy file name to clipboardExpand all lines: content/200-orm/400-tools/06-prisma-studio.mdx
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,9 +134,27 @@ Prisma Studio currently supports the following databases: PostgreSQL, MySQL, and
134
134
### SQLite requirements for Prisma Studio
135
135
136
136
- File paths must have a `file:` protocol right now in the database url for SQLite
137
-
- Node.js 22.5+: Works out of the box with the built-in `node:sqlite` module
138
-
- Node.js 20: Requires installing `better-sqlite3` as a dependency
139
-
- If using pnpm 10+, you'll also need to allow the `better-sqlite3` install script
137
+
-**Node.js 22.5+**: Works out of the box with the built-in `node:sqlite` module
138
+
- May require `NODE_OPTIONS=--experimental-sqlite` environment variable
139
+
-**Node.js 20**: Requires installing `better-sqlite3` as a dependency
140
+
- If using pnpm 10+ with `pnpx`, you'll need the [`--allow-build=better-sqlite3`](https://pnpm.io/cli/dlx#--allow-build) flag
141
+
-**Deno >= 2.2**: Supported via [built-in SQLite module](https://docs.deno.com/api/node/sqlite/)
142
+
-**Bun**: Support for Prisma Studio with SQLite is coming soon and is not available yet
143
+
144
+
:::tip[Using `npx` with `better-sqlite3`]
145
+
146
+
If you don't have `node:sqlite` available in your runtime or prefer not to install `better-sqlite3` as a hard dependency (it adds ~10MB), you can use `npx` to temporarily install the required packages:
147
+
148
+
```terminal
149
+
npx -p better-sqlite3 -p prisma prisma studio --url file:./my_file.db
150
+
```
151
+
152
+
This command:
153
+
- Temporarily installs `better-sqlite3` without adding it to your project dependencies
154
+
- Runs Prisma Studio with the specified SQLite database file
155
+
- Avoids the 10MB overhead of `better-sqlite3` in your project
Copy file name to clipboardExpand all lines: content/250-postgres/300-database/750-serverless-driver.mdx
+27-6Lines changed: 27 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,18 +150,39 @@ With 100ms network latency, 3 sequential queries take 300ms (3 x RTT), but pipel
150
150
151
151
### Parameter streaming
152
152
153
-
Parameters over 1KB are automatically streamed without buffering in memory:
153
+
Parameters over 1KB are automatically streamed without buffering in memory. For large binary parameters, you must use `boundedByteStreamParameter()` which creates a `BoundedByteStreamParameter` object that carries the total byte size, required by the PostgreSQL protocol:
awaitcl.query("INSERT INTO files (data) VALUES ($1)", param)
182
+
```
183
+
184
+
The `boundedByteStreamParameter()` function is provided by the `@prisma/ppg` library and requires the total byte size to be known in advance due to PostgreSQL protocol requirements.
185
+
165
186
### Transactions and batch operations
166
187
167
188
Transactions automatically handle BEGIN, COMMIT, and ROLLBACK:
0 commit comments