sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

fix: Let column names not invalidate Go field names

Open rollulus opened this issue 3 years ago • 1 comments

Column names are less restricted than Go struct field names, which should be proper Go identifiers. Hence, column names cannot be translated directly into field names. This commit tries to address this.

Characters in column names that do not qualify as a Go identifier are stripped. The title casing as applied to underscores is applied to stripped characters.

rollulus avatar Sep 08 '22 17:09 rollulus

I wasn't sure about the e2e test naming convention. Also: thanks for this project!

rollulus avatar Sep 08 '22 17:09 rollulus