Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Postgres DISTINCT FROM #98

Open
bridger opened this issue Jul 24, 2017 · 1 comment
Open

Support Postgres DISTINCT FROM #98

bridger opened this issue Jul 24, 2017 · 1 comment

Comments

@bridger
Copy link

bridger commented Jul 24, 2017

From the Postgres docs there are two ways to handle equality of columns, depending on how you'd like to handle null:

Ordinary comparison operators yield null (signifying "unknown"), not true or false, when either input is null. For example, 7 = NULL yields null, as does 7 <> NULL. When this behavior is not suitable, use the IS [ NOT ] DISTINCT FROM constructs:

I need to use IS DISTINCT FROM, but it seems it isn't supported by Swift Kuery.

Another feature request would be to handle arbitrary string filters. That way when something isn't implemented in Swift Kuery yet I could do something like:

SELECT(documents.documentId, from: documents).where(documents.saved.isNotNull() && "documents.saved IS DISTINCT FROM documents.uploadedToS3")

@kilnerm
Copy link
Contributor

kilnerm commented Sep 4, 2018

This warrants some further investigation as our supported plugins all provide null safe operators.
I'll mark as an enhancement and leave for future consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants