PrismaP
Prisma8mo ago
2 replies
piscopancer

passing a varial to queryRaw

hello, what am i doing wrong?
db.$queryRawUnsafe(
  `
    SELECT "value" #> '{$1}' AS value, name
    FROM "Field"
    WHERE "documentId" = 'eric' AND name = 'name'
  `,
  'cars,0,p'
).then(log)

the issue is with the variable that i use, it just does not work unless I replace $1 with cars,0,p
Was this page helpful?