-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle null/undefined as last query value in mysql and postgres …
…patchers (#81) * fix: handle null/undefined as last query value Was beforehand throwing a TypeError when trying to access the constructor property on `null` or `undefined`: ```js connection.query('SELECT a FROM b', null); // without xray --> resolves query // with xray --> throws TypeError: Cannot read property 'constructor' of null ``` As far as I know null and undefined are the only data types that will encounter this problem, hence a loose null check should suffice. * fix: handle null/undefined as last query value in postgres * test: add test cases for sending null in last query parameter
- Loading branch information
1 parent
5c3c6ff
commit fb0e4e5
Showing
4 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters