Skip to content

Commit

Permalink
feat: log normalized query
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 13, 2017
1 parent d91312c commit a78129b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ export const query: InternalQueryType = async (connection, sql, values = []) =>
try {
const start = process.hrtime();

const result = await connection.query(normalizeValuePlaceholders(sql), arrayFlatten(values));
const normalizedQuery = normalizeValuePlaceholders(sql, values);

debug('normlized query', normalizedQuery);

const result = await connection.query(normalizedQuery, arrayFlatten(values));

const end = process.hrtime(start);

Expand Down

0 comments on commit a78129b

Please sign in to comment.