These settings will result in an invalid config:
...
overrides:
- go_type: "encoding/json.RawMessage"
db_type: "json"
- db_type: "uuid"
null: true
go_type: "*github.com/google/uuid.UUID"
The reason is tha null is a Keyword in YAML. However, this would be fine if I simply got an error using this invalid config. But I don't. instead the null value above is silently ignored and will always default to false.
I can fix the issue by quoting 'null' like this:
...
overrides:
- go_type: "encoding/json.RawMessage"
db_type: "json"
- db_type: "uuid"
'null': true
go_type: "*github.com/google/uuid.UUID"
However, I think this setting name should be deprecated and something like nullable being used instead, and printing some type of warning or similar
https://github.com/kyleconroy/sqlc/blob/fa7660c700757b2654084a0c1a6ad227b7376b42/internal/config/config.go#L142-L143
These settings will result in an invalid config:
The reason is tha
nullis a Keyword in YAML. However, this would be fine if I simply got an error using this invalid config. But I don't. instead thenullvalue above is silently ignored and will always default tofalse.I can fix the issue by quoting
'null'like this:However, I think this setting name should be deprecated and something like
nullablebeing used instead, and printing some type of warning or similarhttps://github.com/kyleconroy/sqlc/blob/fa7660c700757b2654084a0c1a6ad227b7376b42/internal/config/config.go#L142-L143