Configure prisma not to use prepare statements
See original GitHub issueProblem
When I use prisma , I got an error
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Server(ServerError { code: 1047, message: "Prepare unsupported!", state: "HY000" })) })
Because my database administrator disabled the prepare statement which prisma used in database query.
Suggested solution
User can configure prisma not to use prepare statement, like go-sql-driver
It can be used in the dns, like :
mysql://user:password@host:port/db?interpolateParams=true
Alternatives
Or it can be configured in PrismaClientOptions ?
Additional context
null
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Raw database access (Reference) - Prisma
Prisma Client submits prepared statements, and prepared statements only allow a subset of SQL statements. For example, START TRANSACTION is not permitted.
Read more >How to handle conditional prepared statements using prisma ...
You can do it like this: import { Prisma } from '@prisma/client' const where = Prisma.sql`where column = ${condition}` const result = await ......
Read more >Prisma - Supabase
Connect your Supabase postgres database to your Prisma project. ... to use a single connection to the database, and does not support connection...
Read more >It's Prisma Time - Execute your own queries
This method enables us to create custom queries to insert update or delete ... As you can see, it's not so difficult to...
Read more >Prisma | NestJS - A progressive Node.js framework
SQLite databases are simple files; no server is required to use a SQLite database. So instead of configuring a connection URL with a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We’d ideally want to disable prepared statements as they’re not supported by our connection pool system.
Currently there is no option to disable this as we use prepared statements to prevent SQL injection. So I am going to label this as a new feature request.