Skip to content

Commit 3fb1514

Browse files
committed
add typed sql video
1 parent 025c9ee commit 3fb1514

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

examples/typed-sql/README.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Typed SQL
22

3+
<EpicVideo url="https://www.epicweb.dev/tips/prisma-typed-sql-queries" />
4+
35
This is an example of using Prisma Client's 5.19.0 `prisma.$queryRawTyped` for
46
our search page instead of using zod for type safety.

exercises/08.sql/04.solution.order/README.mdx

+17
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,20 @@ back! (I would, but I'm just a 👨‍💼 emoji).
99
`prisma.$queryRaw`. Prisma is pretty powerful by itself and most of the time you
1010
don't need to reach for raw SQL statements. But when you do, you'll be glad that
1111
you could.
12+
13+
---
14+
15+
## Typed SQL
16+
17+
An exciting new feature in Prisma 5.19.0 is the `prisma.$queryRawTyped`
18+
function. This allows you to run raw SQL queries and get typed results back
19+
from your database.
20+
21+
This is a game changer for type safety and developer experience. Check out how
22+
this exercise changes with this new feature here:
23+
24+
<EpicVideo url="https://www.epicweb.dev/tips/prisma-typed-sql-queries" />
25+
26+
<DiffLink app1="08/04.solution" app2="example.typed-sql">
27+
See the diff here
28+
</DiffLink>

0 commit comments

Comments
 (0)