In our company there is a strict rule to never use snakecase in table column names. Table column names must always be in PascalCase (we are using "_" to separate column names when defining index names for example). When using sqlc to generate go code, sqlc looks for "_" in the column names to generate idiomatic go struct fields, but because there is no "_" in PascalCase, the generated field names are non idiomatic go code. Also the "initialisms" feature of sqlc does not work, because it always compares whole chunks (words between "\") in the column names.
Version
1.27.0
What happened?
In our company there is a strict rule to never use snakecase in table column names. Table column names must always be in PascalCase (we are using "_" to separate column names when defining index names for example). When using sqlc to generate go code, sqlc looks for "_" in the column names to generate idiomatic go struct fields, but because there is no "_" in PascalCase, the generated field names are non idiomatic go code. Also the "initialisms" feature of sqlc does not work, because it always compares whole chunks (words between "\") in the column names.
Generated go code
models.go
bookmarks.sql.go
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
SQLite
What type of code are you generating?
Go