mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-01 14:38:50 +00:00
fix(database/rawExecute): append extra null values
This commit is contained in:
1 parent
283e3194cf
commit
2a5e110e29
1 file changed
+6
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user