sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Generate type-safe code from SQL

Results 511 sqlc issues
Sort by recently updated
recently updated
newest added

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`...

:wrench: golang
size:L

### 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 ->>...

bug
:books: postgresql

related to https://github.com/sqlc-dev/sqlc/issues/3663

size:S

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[*],...

size:S

### 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...

bug
:books: postgresql
:wrench: golang
:computer: linux

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...

:books: postgresql
:wrench: golang

### 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...

bug
:wrench: golang
:books: sqlite

### 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...

bug
:books: postgresql
:wrench: golang

The `emit_pointers_for_null_types` option has been made available for use in MySQL.

:wrench: golang
size:L

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.

:wrench: golang
size:S