Skip to content

Commit

Permalink
report SQL before it is run, to aid debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nbogie committed Jan 27, 2024
1 parent 01231a0 commit 9269dc1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/support/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const pool = new Pool({
*/
async function query(sql, values = []) {
console.log("running sql: ", sql);
const dbResult = await pool.query(sql, values);
console.log(
`Queried db and got : ${dbResult.rowCount} row(s). SQL was: ${sql}`,
Expand Down

0 comments on commit 9269dc1

Please sign in to comment.