does `PrismaClient` support programmatically acces...
# orm-help
s
does
PrismaClient
support programmatically accessing its generated SQL query e.g. as a
string
, without executing it? a sort of dry run, for debugging, strong emphasis on not actually executing the query and on 'piping' the query into a standard javascript variable example pseudocode:
Copy code
const sqlThatWouldHaveBeenExecuted: string = stringifyQueryAndDontExecute(await prisma.user.create({
  data: {
    name: 'Alice',
    email: '<mailto:alice@prisma.io|alice@prisma.io>',
  },
}))
I doubt this is possible atm with Prisma judging from a cursory glance, but if so, it would be quite a pleasant surprise for a database playground
1
j
Do you mean get SQL query from prisma function right?
If so, It still does not support but you can track progress on this github issue https://github.com/prisma/prisma/issues/5052
s
precisely that is what I was looking for thank you so much!! I'll keep a close eye on that thread 😄
💚 2
🙌 2