Skip to content

Commit f1d208c

Browse files
committed
Fix handling null query bindings
1 parent 161afe9 commit f1d208c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ class Client_AuroraDataMySQL extends Client_MySQL { // eslint-disable-line camel
160160
}
161161

162162
if (value === null) {
163-
return null;
163+
return {
164+
name,
165+
value: {
166+
isNull: true
167+
}
168+
};
164169
}
165170

166171
if (Buffer.isBuffer(value) || ArrayBuffer.isView(value)) {

tests/test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,12 @@ describe('Query statement tests', () => {
210210
stringValue: '2020-01-01 00:00:00.000'
211211
}
212212
},
213-
null
213+
{
214+
name: '6',
215+
value: {
216+
isNull: true
217+
}
218+
}
214219
],
215220
includeResultMetadata: true
216221
});

0 commit comments

Comments
 (0)