From 6444f9953ddb08b1b98cd0d7eb0d939d25d3971a Mon Sep 17 00:00:00 2001 From: Fiacc O'Brien Moran Date: Thu, 2 Nov 2023 18:25:49 -0700 Subject: [PATCH] fix: correctly pass values when used with sql-template-strings library (#2266) --- lib/connection.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/connection.js b/lib/connection.js index 12c0b8bb12..dcd841cc59 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -623,7 +623,8 @@ class Connection extends EventEmitter { options = { ...options, ...sql, - sql: sql.sql + sql: sql.sql, + values: sql.values }; if (typeof values === 'function') { cb = values; @@ -913,7 +914,8 @@ class Connection extends EventEmitter { options = { ...options, ...sql, - sql: sql.sql + sql: sql.sql, + values: sql.values }; if (typeof values === 'function') { cb = values;