sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Generate type-safe code from SQL

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

Bumps the production-dependencies group with 3 updates in the /docs directory: [babel](https://github.com/python-babel/babel), [idna](https://github.com/kjd/idna) and [pyparsing](https://github.com/pyparsing/pyparsing). Updates `babel` from 2.15.0 to 2.16.0 Release notes Sourced from babel's releases. Version 2.16.0 The...

dependencies
python

### Version 1.27.0 ### What happened? The config parameter `go_struct_tag` works as expected when overriding a column, but not when overriding a type. With the attached config, I hoped that...

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

sqlc 1.25 removed the cgo dependency; updated the tutorial docs for sqlite to reflect this.

### What do you want to change? I'd like to be able to define part of a query, and then reuse that in other queries. I've called it fragments. This...

enhancement
:books: postgresql
:wrench: golang

### What do you want to change? Example config ``` { "version": "2", "sql": [ { "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "codegen": [ { "out": "gen", "plugin": "jsonb" }...

enhancement
:books: postgresql

Most of my Postgres handlers have an error handling block that converts Postgres constraint errors to domain error types. It looks something like this: ```go if e, ok := err.(*pq.Error);...

enhancement
:books: postgresql

Support wrapping any nullable field with a generic type provided by the user. The config looks like this: ```yaml sql: - gen: go: ... generic_null_type: import: "database/sql" type: "Null" ```...

### Version 1.27.0 ### What happened? Consider this query: ``` SELECT * FROM table1 AS t1 JOIN table2 AS t2 ON t1.fk = t2.fk AND t1.fk IN (sqlc.slice('IDs')) OR t2.fk...

bug
:wrench: golang
:computer: windows
:books: sqlite

This PR adds the flag `emit_schema_name`. This will put before all the tables a `%s`, and will replace them inside the function The generated result would look something like this...

### Version 1.27.0 ### What happened? queries.sql:22:12: column "list_name" does not exist ### Relevant log output _No response_ ### Database schema ```sql create table lists ( id serial not null...

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