sqlc
sqlc copied to clipboard
Generate type-safe code from SQL
Fixes #835 This PR adds exporting models to a different package feature to Go code generator. I also added a how-to page for this feature, you can check the `docs/howto/separate-models-file.md`...
### Version 1.27.0 ### What happened? ``` -- name: ListJobs :many -- Returns jobs with reduced data, to reduce payload size select id, (data ->> 'PhoneNumber')::text as phone_number, (data ->>...
related to https://github.com/sqlc-dev/sqlc/issues/3663
Like #3668 but with environment variable support. No idea if this is the best place to put this env-to-config code, and it's also not great that it's writing into config.SQL[*],...
### Version 1.29.0 ### What happened? SQLC duplicates stuct data members when using inherits and like in the same create table statement. For example ```go type LookupRiskType struct { Key...
I've searched through your source code and documentation but I cannot find a solution. I want to select an entry as well as for all entries in another table that...
### Version 1.29.0 ### What happened? When the `BETWEEN` is preceeded by a `WHERE`, then the generation works as expected. Adding the `BETWEEN` after an `AND` makes the generator completely...
### Version 1.28.0 ### What happened? For pgx, `pgtype.Timestamp` is used for `TIMESTAMP` (and other time related types) regardless if the column is nullable or not. `time.Time` was expected to...
The `emit_pointers_for_null_types` option has been made available for use in MySQL.
this fixes the issue where despite having emit_pointers_for_null_types set to true, the generate models don't use pointers for timestamp field.