-
Notifications
You must be signed in to change notification settings - Fork 923
sqlc generate: (mysql) generates structs with non-camel case attribute names #1318
-
I'm not sure what happened, maybe because of the update to v1.11 but previously my sqlc generated structs used to have camel case attribute names like:
type SomeStruct struct { ThisShouldBeCamelCase string }
but now, whenever I do sqlc generate, it generates the struct name in a non-camel case fashion
type SomeStruct struct { Thisshouldbecamelcase string }
What happened here? Is it because of the minor version update? Or is it because I did something wrong? I went to my past projects and tried sqlc generate on them and now they all have compile time errors because of the attribute name change
If this is irreversible, then I need to install the sqlc that was pre-1.11.0 via snap but how do I do that?
EDIT: I guess it did have something to do with the case insensitive changes for v1.11.0. I was able to run sqlc 1.10.0 using the docker way: docker run --rm -v $(pwd):/src -w /src kjconroy/sqlc generate. This might help some of you who are using MySQL like me and cannot afford any breaking changes
Beta Was this translation helpful? Give feedback.
All reactions
This appears to be a regression, tracking here: #1319
Replies: 2 comments
-
This appears to be a regression, tracking here: #1319
Beta Was this translation helpful? Give feedback.
All reactions
-
Any update regarding this? I tried using the latest sqlc and this problem still persists
Beta Was this translation helpful? Give feedback.