Feature Request: Output SQL Queries with Parameters
kz-d opened this issue · comments
Thank you for developing this useful tool!
I've been looking for a way to output SQL queries along with their parameters.
Currently, the verboseQuery
option does allow for SQL logs to be outputted, but it doesn't include the parameters.
A possible workaround could be the following code snippet, but it tends to be a bit clunky and output some unnecessary logs.
beforeAll(async () => {
jestPrisma.originalClient.$on("query", (event) => {
console.debug({ event })
})
})
Since this is a tool for testing, how about adding an option like verboseQueryWithParameters
or making it default to output parameters?
If that's acceptable, I will create a pull request.