Repository navigation
fix(datatypes): don't stringify range bounds when infinite (fixes: #8… - #8210
Conversation
|
@yazshel, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mickhansen, @janmeier and @felixfbecker to be potential reviewers. |
| } | ||
| const valuesStringified = values.map(value => { | ||
| if (this.options.subtype.stringify) { | ||
| if (value === null || value === -Infinity || value === Infinity) { |
There was a problem hiding this comment.
use includes here
if ([null, -Infinity, Infinity].includes(value)) {May be Node 4 doesnt support it, if it doesn't then https://lodash.com/docs/#includes
sushantdhiman
left a comment
There was a problem hiding this comment.
LGTM, just one change
0079130 to
482e30a
Compare
|
I've used |
|
I'm not sure why that AppVeyor build failed with this push - the test log is indicating there may be a memory leak in the MSSQL connection logic at a couple of places. However, I don't see how this could have been introduced as this change is specific to the if (value === null || value === -Infinity || value === Infinity) {to if (_.includes([null, -Infinity, Infinity], value)) {? Is there an intermittent issue with the MSSQL driver or another component here? |
Yes, I have restarted the build |
…192)
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change
Fix range bound processing logic in
RANGE.prototype.stringifyto pass through range bounds ofnullor-Infinity/Infinityunchanged (ie. dont' pass these values to the range subtype's stringify function). This allowsRANGE.stringifyto correctly identify these as infinite bounds and format the range SQL output correctly.Fixes: #8192