Hussam Khatib
08/16/2022, 6:02 AMconst email = '<mailto:emelie@prisma.io|emelie@prisma.io>'
const result = await prisma.$queryRaw`SELECT * FROM User WHERE email = ${email}`
This would not work as email
is enclosed in qoutes. It would work if const email = 2
for example
DB : mySqlRaphael Etim
08/16/2022, 8:44 AMconst email = '<mailto:emelie@prisma.io|emelie@prisma.io>'
const result = await prisma.$queryRaw`SELECT * FROM "User" WHERE email = ${email}`
Hussam Khatib
08/20/2022, 5:15 PMRaphael Etim
08/23/2022, 6:20 AMHussam Khatib
08/23/2022, 6:40 AMRaphael Etim
08/23/2022, 7:44 AMconst email = '<mailto:emelie@prisma.io|emelie@prisma.io>'
const result = await prisma.$queryRaw`SELECT * FROM "User" WHERE email = ${email}`
console.log(result)
The email was parsed correctly and it returned the result
raphael@Raphaels-MBP prisma-graphql % node src/script.js
prisma:query SELECT * FROM "User" WHERE id = $1
[ { email: '<mailto:test@test.com|test@test.com>', id: 2 } ]
Raphael Etim
08/23/2022, 7:46 AM