NULL-aware comparison: IS [NOT] DISTINCT FROM #1857
Replies: 2 comments
-
It's certainly possible to add this to Sequel. I've known about it for a long time, but this is the first request I've received for it. It's possible to emulate support on databases that don't natively support it using a case statement, so it's a feature that Sequel could support on all databases. It would probably be best to add it as a extension, considering it's not a feature that many people would be using. |
Beta Was this translation helpful? Give feedback.
-
In one of my projects we have the following method: def distinct_from_expr(left_expr, right_expr)
DB["? IS DISTINCT FROM ?", left_expr, right_expr]
end Then you can use it as |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thank you for Sequel! Would it make sense to add the
NULL
-aware comparisonIS [NOT] DISTINCT FROM
, so that it is not necessary to fall back toSequel.lit
?Quoting from https://modern-sql.com/feature/is-distinct-from :
It is not widely supported (Postgres does).
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions