Repository navigation
PG: Fixes issues comparing to zero or false - #4667
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4667 +/- ##
==========================================
- Coverage 92.68% 92.66% -0.02%
==========================================
Files 119 119
Lines 8567 8578 +11
==========================================
+ Hits 7940 7949 +9
- Misses 627 629 +2
Continue to review full report at Codecov.
|
flovilmart
suggested changes
Mar 24, 2018
| if (fieldValue.$nin) { | ||
| createConstraint(_.flatMap(fieldValue.$nin, elt => elt), true); | ||
| } | ||
| } else if(fieldValue.$in !== undefined) { |
Contributor
There was a problem hiding this comment.
Use typeof and ‘undefined’ just to make sure
| } | ||
| } else if(fieldValue.$in !== undefined) { | ||
| throw new Parse.Error(Parse.Error.INVALID_JSON, 'bad $in value'); | ||
| } else if (fieldValue.$nin != undefined) { |
Contributor
There was a problem hiding this comment.
Same as above, also make sure you use the same inequality operator (!= vs !==)
flovilmart
approved these changes
Mar 24, 2018
UnderratedDev
pushed a commit
to UnderratedDev/parse-server
that referenced
this pull request
Mar 21, 2020
* initial test * more test * clean up * added correct errors * test fix * $eq null test * type check
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #4653, #4100
Getting rid of
Postgres doesn't support this query type yeterrors and returning proper values.The errors occur when you pass in 0 or false into an if statement.
Let me know if you can think of other queries that I may have missed.