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

fix(compiler): Fix column expansion to work with quoted non-keyword identifiers #2576

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

orisano
Copy link
Contributor

@orisano orisano commented Aug 4, 2023

close #2575
close #2195
close #2005
close #1444

source.Edit had been a string with Old, but it could not be replaced correctly because it could not be distinguished from ast in cases such as when it was quoted.
Therefore, we solved this problem by making Old in source.Edit a function that checks whether each identifier is quoted or not against the actual string to determine the length of the string to be replaced.

Copy link
Collaborator

@kyleconroy kyleconroy left a comment

Choose a reason for hiding this comment

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

I'm hoping that before the end of the year we can replace our current edit-based rewriting with AST-based support. Until that time, I appreciate the improvements.

@kyleconroy kyleconroy merged commit 4d65e68 into sqlc-dev:main Aug 28, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment