fix(db/rawExecute): don't unpack responses for rawExecute

Oversight when implementing the rawExecute export. Technically breaking..
Return ResultSetHeader rather than just a number for affectedRows or insertId.
This commit is contained in:
Linden committed 2023-09-06 13:29:04 +10:00
1 parent 840d39493e
commit a065c1c545
1 file changed
+2 -2
+2 -2
View File
@@ -53,9 +53,9 @@ export const rawExecute = async (
if (cb) { if (cb) {
if (Array.isArray(result) && result.length > 1) { if (Array.isArray(result) && result.length > 1) {
for (const value of result) { for (const value of result) {
response.push(parseResponse(type, value)); response.push(unpack ? parseResponse(type, value) : value);
} }
} else response.push(parseResponse(type, result)); } else response.push(unpack ? parseResponse(type, result) : result);
} }
if (hasProfiler && ((index > 0 && index % 100 === 0) || index === parametersLength - 1)) { if (hasProfiler && ((index > 0 && index % 100 === 0) || index === parametersLength - 1)) {