How To Write Raw SQL w/ Type Safety in Prisma ORM

preview_player
Показать описание
This video introduces TypedSQL, a long-awaited feature in Prisma ORM that makes raw SQL queries type-safe. Learn how this new functionality enhances your development experience by providing type safety, auto-completion, and more! Join @marc-hess as he walks through the benefits of TypedSQL and shows you exactly how to implement it in your projects!

——————————————————

📚 Learn more about Prisma

——————————————————

👋 Connect with the Prisma Community

——————————————————

💬 Follow Prisma on social media

——————————————————

✅ Subscribe to Prisma's YouTube channel
Рекомендации по теме
Комментарии
Автор

🤯 kudos to the prisma team for this feature!

warrensadler
Автор

It would be really cool if you could also define them directly in TS code. For example, if you export a string starting with `sqlPrisma` it gets picked up by the Prisma generator and is able to be used(ideally only within the context of the file)

Saru-Dono
Автор

Thank you for the information,
What about if we need dynamic binding variables like when we are using Where In cluse in raw sql

abhishekmagar
Автор

Great feature to migrate stuff from old repos too.

BarisPalabiyik
Автор

Excellent, it reminds me of "sqlx" in Go.

Does Prisma wrapps the RAW sql query in an additional thing, or does it run as it is? What about transactions, can we write them in RAW sql and expect to work correctly?

aghileslounis
Автор

In order to use the features shown in the video, the database must be connected at the time of building the Prisma client. This is extremely inconvenient. I hope this will be improved soon so that the client can be built using only the Prisma schema information without the dependency on an actual database connection.

최지원-oo
Автор

Interesting… definately will check this out

wandenreich
Автор

This actually makes me want to go back to Prisma. Looks very impressive, I'm curious about it's limitations.
The production quality could be better tho

Saru-Dono
Автор

I did not even think it was possible to overcomplicate this basic feature. Yet you actually overcomplicated what should be simple...

Автор

Wish it had some kind of time zone protection build in so I always get the date and time back in New York time zone or something like that... now it's a mess 😢

codernerd
Автор

waw Prisma support raw SQL in a basic typesafe wrapper? So innovative... Glad it only took 10 years to figure out that it is a bad idea to abstract industri standart SQL.

Автор

Error: ERROR: prepared statement "s2" does not exist, what is this error?

Ashiqdammam
Автор

Interesting feature honestly, but last time I checked prisma wasn’t the best option for serverless, when is that gonna change?

yassine-sa
Автор

Where can I find a Prisma GraphQL course in regular JavaScript or NodeJS, that is updated and supported by a person or community?

I want to learn how to build a complete GraphQL app without having to learn ReactJS web framework as a prerequisite.

makedredd
Автор

It's a cool feature, but ideally I want Prisma as a development time only feature. I'd much rather if I could write type safe SQL and have Prisma generate the types, but not restrain me to then use those queries with Prisma's slow, bulky query engine.

rdil
visit shbcf.ru