-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix comparison of numeric jsonb columns (#22)
Since we use `->>` on `jsonb` fields we always get a string back. Comparisons such as `<` and `>` were done on string values which gives unexpected results. I have tried various other approaches that failed. - Casting everything to a `jsonb` doesn't work because you can't cast query params to `jsonb`. - Using a `CASE WHEN` with `jsonb_typeof` doesn't work because each `WHEN` of a `CASE WHEN` needs to return the same type. - There are also complications with calling `Convert` recursively for `$elemMatch` where you then don't know the column type anymore.
- Loading branch information
1 parent
947a271
commit 9ed74d2
Showing
5 changed files
with
97 additions
and
28 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
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