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: query parser cleanup #496

Merged
merged 3 commits into from
Feb 8, 2024

Conversation

bnjmnt4n
Copy link
Contributor

@bnjmnt4n bnjmnt4n commented Nov 4, 2023

What kind of change does this PR introduce?

Refactor

What is the current behavior?

There is a lot of duplicated code in the query parser, due to the field and renamed field parsing sharing the same code.

What is the new behavior?

The parsing of a field is extracted out to a separate ParseField helper, which can be reused to detect both a renamed field and non-renamed fields. I also updated some comments for accuracy.

@bnjmnt4n
Copy link
Contributor Author

bnjmnt4n commented Jan 8, 2024

Any blockers for this?

@steve-chavez
Copy link
Member

steve-chavez commented Feb 7, 2024

@bnjmnt4n Could you please rebase? Just merged #429 which solves casting and didn't realize it would conflict with this PR.

This removes the duplication of parsing required for renamed fields and
non-renamed fields.
@bnjmnt4n
Copy link
Contributor Author

bnjmnt4n commented Feb 8, 2024

@steve-chavez I've rebased this, and will rebase my other PRs as well.

@steve-chavez steve-chavez merged commit c9cebf8 into supabase:master Feb 8, 2024
1 check passed
@bnjmnt4n bnjmnt4n deleted the query-parser-cleanup branch February 8, 2024 19:06
@bnjmnt4n
Copy link
Contributor Author

Any chance in merging the other PRs: #497, #498, #499? I think a couple of others are particularly useful: #451, #458 (might need rebasing though).

@steve-chavez
Copy link
Member

@bnjmnt4n Yeah, I'd like to merge those. Could you rebase?

@bnjmnt4n
Copy link
Contributor Author

I’ve rebased those as well!

Copy link

🎉 This PR is included in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants