fix(database/rawExecute): append extra null values

This commit is contained in:
Linden committed 2022-11-08 16:57:51 +11:00
1 parent 283e3194cf
commit 2a5e110e29
1 file changed
+6
+6
View File
@@ -28,6 +28,12 @@ export const rawExecute = async (
parameters.forEach((values, index) => {
const executionTime = process.hrtime();
if (placeholders > values.length) {
for (let i = values.length; i < placeholders; i++) {
values[i] = null;
}
}
connection.execute(query, values, (err, results: RowDataPacket[][]) => {
if (err) {
connection.release();