How To Build a Prisma Client Extension

  Рет қаралды 4,696

Prisma

Prisma

Күн бұрын

Пікірлер: 12
@한별인
@한별인 11 ай бұрын
Couldn't we inject the extends functionality into the prismaService in nestjs?
@franky47
@franky47 Жыл бұрын
2:29 what are the benefits of calling extends in the extension definition, compared to the object declaration syntax? Since the result of Prisma.defineExtension will be extended by users, wouldn't that be redundant?
@PrismaData
@PrismaData Жыл бұрын
Thanks for your question! I'm sure others may have the same thoughts, so I'll explain. ***defineExtension*** is here for two purposes, but in simpler words, it's all about share-ability: - It allows you to define an extension outside of the client. You may want to keep it in a separate file. Also, you get the inference and the fancy types that you'd otherwise get on the $extends call. - If you're an extension author, it is the only way to define an extension so it can be shared as a package.
@PrismaData
@PrismaData Жыл бұрын
What will you build with Prisma Client extensions? Remember to share them with us! Repo can be found here: github.com/sabinadams/prisma-field-picker
@Broski_Rodragweez
@Broski_Rodragweez 9 ай бұрын
But you did still use map(), you just did so in side your extension rather then in the code that calls the prisma query.
@Pesca.Shorts
@Pesca.Shorts Жыл бұрын
possible queryraw()?
@justine_chang39
@justine_chang39 8 ай бұрын
awesome
@t3ntube357
@t3ntube357 8 ай бұрын
why you wrote what you wrote???
@jjoonjj714
@jjoonjj714 Жыл бұрын
Is it possible to create an extension that uses the client with another extension?
@PrismaData
@PrismaData Жыл бұрын
Yup! You can continue to extend a client to add more functionality.
@jjoonjj714
@jjoonjj714 Жыл бұрын
@@PrismaData Is there an example of this somewhere, would like to see it
@PrismaData
@PrismaData Жыл бұрын
@@jjoonjj714 Hopefully this helps! www.prisma.io/docs/concepts/components/prisma-client/client-extensions#multiple-extensions
Is Drizzle Really Better Than Prisma?
20:15
Web Dev Simplified
Рет қаралды 88 М.
Seeding Databases with Prisma
5:14
Prisma
Рет қаралды 24 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 9 МЛН
Одну кружечку 😂❤️
00:12
Денис Кукояка
Рет қаралды 2,2 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 38 МЛН
Most React devs don’t understand generic components
5:43
Matt Pocock
Рет қаралды 49 М.
Prisma 5: Faster By Default | Prime Reacts
19:01
ThePrimeTime
Рет қаралды 40 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 663 М.
Drizzle vs Prisma: Which ORM is right for YOU?
5:59
Kodaps Academy
Рет қаралды 10 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 232 М.
Self-Hosting Next.js
45:13
leerob
Рет қаралды 72 М.
Introducing Pulse, Real-time Databases Made Easy!
6:06
Prisma
Рет қаралды 6 М.
I Have A New Favorite Database Tool
5:46
Theo - t3․gg
Рет қаралды 123 М.
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 9 МЛН