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

Query parser: IN #4266

Closed
ironage opened this issue Jan 9, 2021 · 1 comment · Fixed by #5663
Closed

Query parser: IN #4266

ironage opened this issue Jan 9, 2021 · 1 comment · Fixed by #5663
Assignees

Comments

@ironage
Copy link
Contributor

ironage commented Jan 9, 2021

We only support IN when the right hand side is a list property, but we should also support this when the right hand side is a list of constants.
For example: fruit IN {'apple', 'orange'}. This is equivilent to fruit == 'apple' || fruit == 'orange'

Part of #2978 and reported by realm/realm-js#2781

@astigsen
Copy link
Contributor

astigsen commented Jul 6, 2022

This should also work with the left hand hand side being a list property. In that case fruits IN {'apple', 'orange'} will be equivalent to: ANY fruits == 'apple' || ANY fruits == 'orange'

As a next step I would like to see it also interoperate with our collections operators, so that you could do:
ANY fruits IN {'apple', 'orange'}
NONE fruits IN {'apple', 'orange'}
ALL fruits IN {'apple', 'orange'}

@realm realm deleted a comment from sync-by-unito bot Aug 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants