SqliteWorker: log query parameters

This commit is contained in:
Alex Gleason 2024-04-08 09:13:20 -05:00
parent 96887483e8
commit 2fb2b2ce2a
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 6 additions and 1 deletions

View File

@ -27,7 +27,12 @@ export const SqliteWorker = {
if (perf) {
const { duration } = perf.measure('end', 'start');
console.debug(`${sql} \x1b[90m(${(duration / 1000).toFixed(2)}s)\x1b[0m`);
console.debug(
sql.replace(/\s+/g, ' '),
JSON.stringify(parameters),
`\x1b[90m(${(duration / 1000).toFixed(2)}s)\x1b[0m`,
);
perf.clearMarks();
perf.clearMeasures();