Skip to content

Structs names no have non-camel case attribute names #1319

Closed
@kyleconroy

Description

@kyleconroy

Version

1.11.0

What happened?

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
}

Relevant log output

No response

Database schema

-- Example queries for sqlc
CREATE TABLE authors (
  nameForBook text      NOT NULL
);

SQL queries

-- name: GetAuthor :one
SELECT * FROM authors;

Configuration

{
  "version": "1",
  "packages": [
    {
      "path": "db",
      "engine": "mysql",
      "schema": "query.sql",
      "queries": "query.sql"
    }
  ]
}

Playground URL

https://play.sqlc.dev/p/ab9bd10aca020c2bbac0312a833d2e80d660f541f64fff706ca0a6720d5cac91

What operating system are you using?

macOS

What database engines are you using?

MySQL

What type of code are you generating?

Go

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions