Skip to content

Manual fix for incorrect handling of "calories"#2018

Merged
kyleconroy merged 3 commits into
sqlc-dev:mainfrom
mpyw:fix/incorrect-handling-of-calories
Jan 17, 2023
Merged

Manual fix for incorrect handling of "calories"#2018
kyleconroy merged 3 commits into
sqlc-dev:mainfrom
mpyw:fix/incorrect-handling-of-calories

Conversation

@mpyw

@mpyw mpyw commented Jan 13, 2023

Copy link
Copy Markdown
Contributor

@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

mpyw commented Feb 15, 2023

Copy link
Copy Markdown
Contributor Author

@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

mpyw commented Feb 15, 2023

Copy link
Copy Markdown
Contributor Author

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

Related:

@mpyw

mpyw commented Feb 15, 2023

Copy link
Copy Markdown
Contributor Author

Current workaround: Use global rename config

@pexarkh

pexarkh commented Feb 15, 2023

Copy link
Copy Markdown

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