Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sqlc generate: (mysql) generates structs with non-camel case attribute names #1318

Discussion options

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

You must be logged in to vote

This appears to be a regression, tracking here: #1319

Replies: 2 comments

Comment options

This appears to be a regression, tracking here: #1319

You must be logged in to vote
0 replies
Answer selected by kyleconroy
Comment options

Any update regarding this? I tried using the latest sqlc and this problem still persists

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /