Cannot pass Prisma.empty to $executeRaw function #11233
Labels
bug/1-unconfirmed
Bug should have enough information for reproduction, but confirmation has not happened yet.
kind/bug
A reported bug.
team/client
Issue for team Client.
topic: raw
$queryRaw(Unsafe) and $executeRaw(Unsafe): https://www.prisma.io/docs/concepts/components/prisma-cli
Milestone
Bug description
We have a function which generates raw queries based on its input. then the generated query will be passed to
$executeRaw
to run it. in some conditions, the function may returnPrisma.empty
. In this case Prisma throws a PrismaClientValidationErrorwe had no problems in version 2.30.3, This happened after upgrading "prisma" & "@prisma/client" version to 3.8.1
How to reproduce
await db.$executeRaw(Prisma.empty);
throws this error:
Expected behavior
to run it without any errors. preferably don't issue any queries if the input is
Prisma.empty
Prisma information
N/A
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: