prisma chobo
09/14/2021, 10:30 PMPrismaClientKnownRequestError:
Invalid `prisma.queryRaw()` invocation:
Raw query failed. Code: `N/A`. Message: `N/A`
at RequestHandler.request (/Users/kyuhakyuk/github/wallet/api/node_modules/@prisma/client/runtime/index.js:37318:15) {
code: 'P2010',
clientVersion: '3.0.2',
meta: { code: 'N/A', message: 'N/A' }
}
For this line of code:
const result = (await prisma.$queryRaw(
Prisma.sql`SELECT SUM(amount) as balance FROM Balance WHERE account=“${accountId}” and deletedAt is NULL`
)) as any;
it used to work just find but now it does not….
aRyan
09/16/2021, 6:03 AMconst result = (await prisma.$queryRaw`SELECT SUM(amount) as balance FROM Balance WHERE account="${accountId}" and deletedAt is NULL`) as any;