TypedSQL - Generating without a DB connection
Hey everyone! We are trying out TypedSQL and it's working great for now.
The main issue we're having is that to generate the complete client (with the
--sql
flag), a working database connection is required.
As we're building our production containers on a stateless CI environment, we would like to avoid this constraint.
Is there a way to correctly infer and build TypedSQL types directly from the schema.prisma
file?
Thanks!4 Replies
GitHub
Preview feature feedback:
typedSql
· prisma prisma · Discussion #...TypedSQL is a new feature of Prisma ORM which lets you write your raw SQL queries in a fully type-safe manner. Documentation: https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/typedsql Ann...
Came here to ask the same question after already posting in that discussion. Would be really great if we didn't need an active connection to run
--sql
.Seems like it's a common issue, someone else beat me to it today 🙂
Leaving here the corresponding link, and marking as solved: https://github.com/prisma/prisma/discussions/25106#discussioncomment-10493523
GitHub
Preview feature feedback:
typedSql
· prisma prisma · Discussion #...TypedSQL is a new feature of Prisma ORM which lets you write your raw SQL queries in a fully type-safe manner. Documentation: https://www.prisma.io/docs/orm/prisma-client/using-raw-sql/typedsql Ann...