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

Skip empty arrays when creating IN() condition #881

Closed
wants to merge 1 commit into from

Conversation

luku
Copy link
Contributor

@luku luku commented Feb 22, 2019

Without this, I need to always check if the array parameter is empty and remove it prior calling getSelectForFindBy().

@zerocrates
Copy link
Member

My only concern is whether this should be falling down to an "always false" type construction... dev expectations of a query asking "is X in [some set]" might reasonably be that it should be false if that set is empty.

@luku
Copy link
Contributor Author

luku commented Feb 23, 2019

Not sure I get your point. Empty IN() causes SQL error, so there's no reason to allow unsupported expression. There's another similar problem with NULLs, which I addressed in PR #749, but there I didn't skip empty parameters. So actually neither of my pull requests is ultimate solution:)
I think I will update #749 instead and close this one

@luku
Copy link
Contributor Author

luku commented Feb 26, 2019

I've updated #749 instead

@luku luku closed this Feb 26, 2019
@luku luku deleted the empty-in branch February 26, 2019 15:21
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

Successfully merging this pull request may close these issues.

2 participants