question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure prisma not to use prepare statements

See original GitHub issue

Problem

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:open
  • Created 3 years ago
  • Reactions:4
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
themagickoalacommented, Jun 21, 2022

We’d ideally want to disable prepared statements as they’re not supported by our connection pool system.

1reaction
pantharshit00commented, Mar 10, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found