Haven't seen others with this prob, so perhaps it'...
# orm-help
l
Haven't seen others with this prob, so perhaps it's me and could use some ideas to help troubleshoot. I have an Express route that can successfully query postgres with the prisma client (findOne & findMany work fine with my model, I get data). But switching the same route to use raw sql on the same table gives error: TypeError: prisma.raw is not a function
Copy code
const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
const result = await prisma.raw`SELECT * FROM Users;`
(v2beta8, v2beta9 and v2.0 today). I removed and reinstalled all libs and hit the same snag. I tried adding sql and raw to the require, but those are for sql templating and had no effect. Any ideas? Thx!
a
@Larry Hengl row removed from beta8 see notes here https://github.com/prisma/prisma/releases/tag/2.0.0-beta.8
l
ah, that's it. those changes work. many thanks! i guess the docs just need to catch up: https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access
👍 1
a
@nikolasburk Update docs issue
j
We are aware and tracking this in https://github.com/prisma/prisma/issues/2560 - sorry for the confusion this caused. Didn't get to all the last minute changes.
👍 2