SJ
10/02/2022, 12:45 AMPrismaClient
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:
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 playgroundJarupong
10/02/2022, 12:59 AMJarupong
10/02/2022, 1:02 AMSJ
10/02/2022, 1:21 AM