File tree 2 files changed +19
-0
lines changed
exercises/08.sql/04.solution.order
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Typed SQL
2
2
3
+ <EpicVideo url = " https://www.epicweb.dev/tips/prisma-typed-sql-queries" />
4
+
3
5
This is an example of using Prisma Client's 5.19.0 ` prisma.$queryRawTyped ` for
4
6
our search page instead of using zod for type safety.
Original file line number Diff line number Diff line change @@ -9,3 +9,20 @@ back! (I would, but I'm just a 👨💼 emoji).
9
9
` prisma.$queryRaw ` . Prisma is pretty powerful by itself and most of the time you
10
10
don't need to reach for raw SQL statements. But when you do, you'll be glad that
11
11
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 >
You can’t perform that action at this time.
0 commit comments