Skip to content

Manual fix for incorrect handling of "calories" #2018

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

Merged
merged 3 commits into from
Jan 17, 2023
Merged

Manual fix for incorrect handling of "calories" #2018

merged 3 commits into from
Jan 17, 2023

Conversation

mpyw
Copy link
Contributor

@mpyw mpyw commented Jan 13, 2023

@kyleconroy kyleconroy merged commit 4f8da00 into sqlc-dev:main Jan 17, 2023
@mpyw mpyw deleted the fix/incorrect-handling-of-calories branch January 18, 2023 02:52
@mpyw
Copy link
Contributor Author

mpyw commented Feb 15, 2023

@kyleconroy

I noticed that this change didn't make sense! The name in my project was product_calories, so the exact match has no effect...

Why not add the feature renaming the table name function on the top of the existing feature renaming field names?

@mpyw
Copy link
Contributor Author

mpyw commented Feb 15, 2023

I noticed that the feature has been already supported, but it looks to be broken.

Related:

@mpyw
Copy link
Contributor Author

mpyw commented Feb 15, 2023

Current workaround: Use global rename config

@pexarkh
Copy link

pexarkh commented Feb 15, 2023

The feature to rename tables would be very much appreciated. For example, in a project i'm currently on, there is a table called EmailFTS, where FTS stands for Full-Text Search (it's a separate sqlite table serving as a full text index). So sqlc makes type EmailsFT struct out of it which is not really fully meaningful...

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.

Table "calories" incorrectly generates model "calory", not "calorie"
3 participants