Skip to content

feat: Add an IN query to the SQL statement #290

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

Closed
wants to merge 3 commits into from

Conversation

WLmutou
Copy link

@WLmutou WLmutou commented Apr 16, 2025

feat: Add an IN query to the SQL statement

@github-actions github-actions bot added the C-lib Crate: cot (main library crate) label Apr 16, 2025
@WLmutou WLmutou changed the title add 'in' query feat: Add an IN query to the SQL statement Apr 16, 2025
Copy link
Member

@m4tx m4tx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Thanks for the contribution and sorry for the massive delay in my response—I lost this in my email queue somehow.

The change seems to be missing the code that actually parses the "in" keyword in the query! macro (this should be added to the parsing code in expr.rs) and some unit tests—right now it doesn't seem to work.

Also, another question is whether we actually want to implement the change with the proposed syntax: perhaps instead of $field in (1, 2, 3) we might want [1, 2, 3].contains($field)? First one is obviously more similar to the SQL generated, but we generally prefer to have more Rusty syntax for the queries. What do you think?

@WLmutou WLmutou closed this May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-lib Crate: cot (main library crate)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants