You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
// ((("meta"->>'map' ~* $1) OR ("meta"->>'map' ~* $2)) AND ("meta"->>'password' = $3) AND (("meta"->>'playerCount' >= $4) AND ("meta"->>'playerCount' < $5)))
36
+
// ((("meta"->>'map' ~* $1) OR ("meta"->>'map' ~* $2)) AND ("meta"->>'password' = $3) AND ((("meta"->>'playerCount')::numeric >= $4) AND (("meta"->>'playerCount')::numeric < $5)))
0 commit comments