Commit 0f35009
committed
fix: remove outdated section about shutdown hooks with prisma
This section has not been relevant since the introduction of the library
engine as the default in Prisma 3. Now, in Prisma 5, the code example
does not compile anymore since the `beforeExit` event was removed from
Prisma Client (except when generating the client with the binary engine
type, which most users should not do unless they have good reasons).
Note that even in Prisma 2 or when switching to the binary engine, using
`beforeExit` would've only been necessary to be able to run database
queries in lifecycle hooks, and wouldn't be necessary otherwise. The
justification for using `beforeExit` that was present in this section
was not fully accurate because while the bug it refers to
(prisma/prisma#3773) was fixed together with
the introduction of `beforeExit` hook (which I believe led to the
confusion), those were not strictly related changes.1 parent 330ddd6 commit 0f35009
1 file changed
+2
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 259 | | |
266 | 260 | | |
267 | 261 | | |
268 | | - | |
| 262 | + | |
269 | 263 | | |
270 | 264 | | |
271 | 265 | | |
| |||
518 | 512 | | |
519 | 513 | | |
520 | 514 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | 515 | | |
542 | 516 | | |
543 | 517 | | |
| |||
0 commit comments