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

refactor: break up Query behavior for better clarity #941

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

jcrossley3
Copy link
Contributor

Reorganize the tests as well, though many use the same dummy Advisory model in the parent tests module.

Copy link
Collaborator

@JimFuller-RedHat JimFuller-RedHat left a comment

Choose a reason for hiding this comment

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

nicely done ... boring observation (that perhaps others have already mentioned in the past): It is always tricky to know how far to go hand crafting parser(s) when something anchored (for example with EBNF) would be comprehensive/contained ... query.rs does a reasonable job at balancing off pros/cons and even better if this finds its way into sea_orm in some far future day ... otherwise LGTM.

@helio-frota helio-frota self-requested a review October 24, 2024 11:12
Copy link
Collaborator

@helio-frota helio-frota left a comment

Choose a reason for hiding this comment

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

more elegant code that also helps when using mem and cpu profiling tools

@jcrossley3
Copy link
Contributor Author

nicely done ... boring observation (that perhaps others have already mentioned in the past): It is always tricky to know how far to go hand crafting parser(s) when something anchored (for example with EBNF) would be comprehensive/contained ... query.rs does a reasonable job at balancing off pros/cons and even better if this finds its way into sea_orm in some far future day ... otherwise LGTM.

Thanks... I think! 😄

I've always claimed I'd be open to using a parser (i've looked at chumsky) for our query syntax when introducing it makes the code more clear. As it stands, I think the regex suffices for clarity, but we'll see how our query needs evolve.

@jcrossley3 jcrossley3 added this pull request to the merge queue Oct 24, 2024
@JimFuller-RedHat
Copy link
Collaborator

to be clear I meant very nicely done! no sideways snide with the EBNF mention intended !

Merged via the queue into trustification:main with commit ab45c4b Oct 24, 2024
3 checks passed
@jcrossley3 jcrossley3 deleted the q-refactor branch October 24, 2024 13:56
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.

3 participants