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

Empty slice generates NOT IN(NULL) SQL statement #99

Closed
Julusian opened this issue Aug 19, 2017 · 4 comments
Closed

Empty slice generates NOT IN(NULL) SQL statement #99

Julusian opened this issue Aug 19, 2017 · 4 comments

Comments

@Julusian
Copy link

Follow up to #61

I have hit an issue with the decided upon solution for #61.

When the query is built as WHERE id IN (NULL) I get 0 rows as I would expect, but if the query is WHERE id NOT IN (NULL) I also get 0 rows when I would instead expect it to find every row.

So in the case where the operation is a NOT IN it would make sense to drop the condition completely.

@lann
Copy link
Member

lann commented Aug 23, 2017

Thanks for the report; take a look at #100

@lann lann closed this as completed in c199e09 Aug 23, 2017
@lann
Copy link
Member

lann commented Aug 25, 2017

Had to revert the fix due to #101.

@lann lann reopened this Aug 25, 2017
@lann lann closed this as completed in a6b9300 Aug 25, 2017
@lann
Copy link
Member

lann commented Aug 25, 2017

New fix, now with 100% more regression test.

@Julusian
Copy link
Author

Julusian commented Sep 2, 2017

I have just had a chance to test this and it appears to be working now.
Thanks

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

No branches or pull requests

2 participants