Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent bind error with undefined/null parameters (#375)
statement.bind(null) initially did not throw an error (and did not bind any parameter either), by chance, because of the way iteration on bind parameters was implemented. Libraries such as https://github.com/typeorm/typeorm came to depend on this undocumented behavior. After the port from coffescript to javascript, calling statement.bind with null started to throw an error, which broke some dependent code. This commit reintroduces the original behavior, documents it, and adds a test for it.
- Loading branch information
Showing
2 changed files
with
15 additions
and
6 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